<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
img {
max-width: 100%;
height: auto;
}
p.details {
font-style:italic;
color:#777
}
.footer p {
font-size:small;
color:#777
}
pre.commit-message {
white-space: pre-wrap;
}
.file-stats a {
text-decoration: none;
}
.file-stats .new-file {
color: #090;
}
.file-stats .deleted-file {
color: #B00;
}}
</style>
<body>
<div class='content'>
<h3>Raymond Toy pushed to branch rtoy-unix-core at <a href="https://gitlab.common-lisp.net/cmucl/cmucl">cmucl / cmucl</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/f4d7036b4f8b68c513f51cd3839f2b83f94202af">f4d7036b</a></strong>
<div>
<span>by Raymond Toy</span>
<i>at 2015-05-16T13:50:01Z</i>
</div>
<pre class='commit-message'>Add stat and friends for solaris.</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
src/code/unix.lisp
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.common-lisp.net/cmucl/cmucl/commit/f4d7036b4f8b68c513f51cd3839f2b83f94202af#diff-0'>
<strong>
src/code/unix.lisp
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/src/code/unix.lisp
</span><span style="color: #000000;background-color: #ddffdd">+++ b/src/code/unix.lisp
</span><span style="color: #aaaaaa">@@ -1241,6 +1241,8 @@
</span> (slot ,buf 'st-blksize)
(slot ,buf 'st-blocks)))
<span style="color: #000000;background-color: #ddffdd">+#-solaris
+(progn
</span> (defun unix-stat (name)
_N"Unix-stat retrieves information about the specified
file returning them in the form of multiple values.
<span style="color: #aaaaaa">@@ -1272,6 +1274,43 @@
</span> (syscall (#-netbsd "fstat" #+netbsd "__fstat50" int (* (struct stat)))
(extract-stat-results buf)
fd (addr buf))))
<span style="color: #000000;background-color: #ddffdd">+)
+
+;;; 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))))
+)
</span>
(def-alien-type nil
(struct rusage
</code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/f4d7036b4f8b68c513f51cd3839f2b83f94202af">View it on GitLab</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.common-lisp.net/cmucl/cmucl/commit/f4d7036b4f8b68c513f51cd3839f2b83f94202af"}}</script>
</p>
</div>
</body>
</html>