Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl-copy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard M Kreuter
cmucl-copy
Commits
f4d7036b
Commit
f4d7036b
authored
9 years ago
by
Raymond Toy
Browse files
Options
Downloads
Patches
Plain Diff
Add stat and friends for solaris.
parent
56dac608
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/code/unix.lisp
+39
-0
39 additions, 0 deletions
src/code/unix.lisp
with
39 additions
and
0 deletions
src/code/unix.lisp
+
39
−
0
View file @
f4d7036b
...
...
@@ -1241,6 +1241,8 @@
(
slot
,
buf
'st-blksize
)
(
slot
,
buf
'st-blocks
)))
#-
solaris
(
progn
(
defun
unix-stat
(
name
)
_N
"Unix-stat retrieves information about the specified
file returning them in the form of multiple values.
...
...
@@ -1272,6 +1274,43 @@
(
syscall
(
#-
netbsd
"fstat"
#+
netbsd
"__fstat50"
int
(
*
(
struct
stat
)))
(
extract-stat-results
buf
)
fd
(
addr
buf
))))
)
;;; 64-bit versions of stat and friends
#+
solaris
(
progn
(
defun
unix-stat
(
name
)
_N
"Unix-stat retrieves information about the specified
file returning them in the form of multiple values.
See the UNIX Programmer's Manual for a description
of the values returned. If the call fails, then NIL
and an error number is returned instead."
(
declare
(
type
unix-pathname
name
))
(
when
(
string=
name
""
)
(
setf
name
"."
))
(
with-alien
((
buf
(
struct
stat64
)))
(
syscall
(
"stat64"
c-string
(
*
(
struct
stat64
)))
(
extract-stat-results
buf
)
(
%name->file
name
)
(
addr
buf
))))
(
defun
unix-lstat
(
name
)
_N
"Unix-lstat is similar to unix-stat except the specified
file must be a symbolic link."
(
declare
(
type
unix-pathname
name
))
(
with-alien
((
buf
(
struct
stat64
)))
(
syscall
(
"lstat64"
c-string
(
*
(
struct
stat64
)))
(
extract-stat-results
buf
)
(
%name->file
name
)
(
addr
buf
))))
(
defun
unix-fstat
(
fd
)
_N
"Unix-fstat is similar to unix-stat except the file is specified
by the file descriptor fd."
(
declare
(
type
unix-fd
fd
))
(
with-alien
((
buf
(
struct
stat64
)))
(
syscall
(
"fstat64"
int
(
*
(
struct
stat64
)))
(
extract-stat-results
buf
)
fd
(
addr
buf
))))
)
(
def-alien-type
nil
(
struct
rusage
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment