<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/a08b9be0e5afc2e7fe969072a3a1f23d8d781937">a08b9be0</a></strong>
<div>
<span>by Raymond Toy</span>
<i>at 2015-05-16T22:16:15Z</i>
</div>
<pre class='commit-message'>Remove utsname and unix-uname.</pre>
</li>
<li>
<strong><a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/68001f496bb9647d1ae2315b7006450d3294e880">68001f49</a></strong>
<div>
<span>by Raymond Toy</span>
<i>at 2015-05-17T07:45:18Z</i>
</div>
<pre class='commit-message'>Add some comments from unix/unix.lisp.</pre>
</li>
<li>
<strong><a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/a85043ace7efd4db54b9b3e60de66bbc6a0c4eeb">a85043ac</a></strong>
<div>
<span>by Raymond Toy</span>
<i>at 2015-05-17T07:45:34Z</i>
</div>
<pre class='commit-message'>Remove items that are in code/unix.lisp</pre>
</li>
</ul>
<h4>2 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
src/code/unix.lisp
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
src/contrib/unix/unix.lisp
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.common-lisp.net/cmucl/cmucl/compare/c076d5501e7c12e8c9dcebbc30b117d0e9cc649d...a85043ace7efd4db54b9b3e60de66bbc6a0c4eeb#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">@@ -2435,6 +2435,9 @@
</span> :dir (string (cast (slot result 'pw-dir) c-call:c-string))
:shell (string (cast (slot result 'pw-shell) c-call:c-string))))))
<span style="color: #000000;background-color: #ddffdd">+;;; Getrusage is not provided in the C library on Solaris 2.4, and is
+;;; rather slow on later versions so the "times" system call is
+;;; provided.
</span> #+(and sparc svr4)
(progn
(def-alien-type nil
<span style="color: #aaaaaa">@@ -2458,6 +2461,8 @@
</span> (slot usage 'tms-cstime))))
) ; end progn
<span style="color: #000000;background-color: #ddffdd">+;; Requires call to tzset() in main.
+;; Don't use this now: we
</span> #+(or linux svr4)
(progn
(def-alien-variable ("daylight" unix-daylight) int)
<span style="color: #aaaaaa">@@ -2512,4 +2517,3 @@
</span> (cast (slot names 'machine) c-string))
#+freebsd 256
(addr names))))
-
</code></pre>
<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.common-lisp.net/cmucl/cmucl/compare/c076d5501e7c12e8c9dcebbc30b117d0e9cc649d...a85043ace7efd4db54b9b3e60de66bbc6a0c4eeb#diff-1'>
<strong>
src/contrib/unix/unix.lisp
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/src/contrib/unix/unix.lisp
</span><span style="color: #000000;background-color: #ddffdd">+++ b/src/contrib/unix/unix.lisp
</span><span style="color: #aaaaaa">@@ -221,20 +221,8 @@
</span> (def-alien-type ino64-t u-int64-t)
(def-alien-type blkcnt64-t u-int64-t))
-(def-alien-type nlink-t
<span style="color: #000000;background-color: #ffdddd">- #-(or svr4 netbsd) unsigned-short
- #+netbsd unsigned-long
- #+svr4 unsigned-long)
</span>-
;;; From sys/time.h
-#+(or linux svr4)
-; High-res time. Actually posix definition under svr4 name.
-(def-alien-type nil
<span style="color: #000000;background-color: #ffdddd">- (struct timestruc-t
- (tv-sec time-t)
- (tv-nsec long)))
</span>-
;;; From ioctl.h
<span style="color: #aaaaaa">@@ -287,61 +275,6 @@
</span> (st-gen unsigned-long)
(st-spare (array unsigned-long 2))))
-#+(or linux svr4)
-(def-alien-type nil
<span style="color: #000000;background-color: #ffdddd">- (struct stat
- (st-dev dev-t)
- (st-pad1 #-linux (array long 3) #+linux unsigned-short)
- (st-ino ino-t)
- (st-mode #-linux unsigned-long #+linux unsigned-short)
- (st-nlink #-linux short #+linux unsigned-short)
- (st-uid #-linux uid-t #+linux unsigned-short)
- (st-gid #-linux gid-t #+linux unsigned-short)
- (st-rdev dev-t)
- (st-pad2 #-linux (array long 2) #+linux unsigned-short)
- (st-size off-t)
- #-linux (st-pad3 long)
- #+linux (st-blksize unsigned-long)
- #+linux (st-blocks unsigned-long)
- #-linux (st-atime (struct timestruc-t))
- #+linux (st-atime unsigned-long)
- #+linux (unused-1 unsigned-long)
- #-linux (st-mtime (struct timestruc-t))
- #+linux (st-mtime unsigned-long)
- #+linux (unused-2 unsigned-long)
- #-linux (st-ctime (struct timestruc-t))
- #+linux (st-ctime unsigned-long)
- #+linux (unused-3 unsigned-long)
- #+linux (unused-4 unsigned-long)
- #+linux (unused-5 unsigned-long)
- #-linux(st-blksize long)
- #-linux (st-blocks long)
- #-linux (st-fstype (array char 16))
- #-linux (st-pad4 (array long 8))))
</span>-
-;;; 64-bit stat for Solaris
-#+solaris
-(def-alien-type nil
<span style="color: #000000;background-color: #ffdddd">- (struct stat64
- (st-dev dev-t)
- (st-pad1 (array long 3)) ; Pad so ino is 64-bit aligned
- (st-ino ino64-t)
- (st-mode unsigned-long)
- (st-nlink short)
- (st-uid uid-t)
- (st-gid gid-t)
- (st-rdev dev-t)
- (st-pad2 (array long 3)) ; Pad so size is 64-bit aligned
- (st-size off64-t)
- (st-atime (struct timestruc-t))
- (st-mtime (struct timestruc-t))
- (st-ctime (struct timestruc-t))
- (st-blksize long)
- (st-pad3 (array long 1)) ; Pad so blocks is 64-bit aligned
- (st-blocks blkcnt64-t)
- (st-fstype (array char 16))
- (st-pad4 (array long 8))))
</span>-
;;; From sys/resource.h
(def-alien-type nil
<span style="color: #aaaaaa">@@ -642,107 +575,6 @@
</span> siocspgrp
(alien:alien-sap (alien:addr alien-pgrp)))))
-;;; STAT and friends.
-
-;;; 64-bit versions of stat and friends
-#+solaris
-(progn
-(defun unix-stat (name)
<span style="color: #000000;background-color: #ffdddd">- _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)))
</span>- (extract-stat-results buf)
- (%name->file name) (addr buf))))
-
-(defun unix-lstat (name)
<span style="color: #000000;background-color: #ffdddd">- _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)))
</span>- (extract-stat-results buf)
- (%name->file name) (addr buf))))
-
-(defun unix-fstat (fd)
<span style="color: #000000;background-color: #ffdddd">- _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)))
</span>- (extract-stat-results buf)
- fd (addr buf))))
-)
-
-
-;;; Getrusage is not provided in the C library on Solaris 2.4, and is
-;;; rather slow on later versions so the "times" system call is
-;;; provided.
-#+(and sparc svr4)
-(progn
-(def-alien-type nil
<span style="color: #000000;background-color: #ffdddd">- (struct tms
- (tms-utime #-alpha long #+alpha int) ; user time used
- (tms-stime #-alpha long #+alpha int) ; system time used.
- (tms-cutime #-alpha long #+alpha int) ; user time, children
- (tms-cstime #-alpha long #+alpha int))) ; system time, children
</span>-
-(declaim (inline unix-times))
-(defun unix-times ()
<span style="color: #000000;background-color: #ffdddd">- _N"Unix-times returns information about the cpu time usage of the process
- and its children."
- (with-alien ((usage (struct tms)))
- (alien-funcall (extern-alien "times" (function int (* (struct tms))))
</span>- (addr usage))
<span style="color: #000000;background-color: #ffdddd">- (values t
</span>- (slot usage 'tms-utime)
- (slot usage 'tms-stime)
- (slot usage 'tms-cutime)
- (slot usage 'tms-cstime))))
-) ; end progn
-
-;; Requires call to tzset() in main.
-;; Don't use this now: we
-#+(or linux svr4)
-(progn
<span style="color: #000000;background-color: #ffdddd">- (def-alien-variable ("daylight" unix-daylight) int)
- (def-alien-variable ("timezone" unix-timezone) time-t)
- (def-alien-variable ("altzone" unix-altzone) time-t)
- #-irix (def-alien-variable ("tzname" unix-tzname) (array c-string 2))
- #+irix (defvar unix-tzname-addr nil)
- #+irix (pushnew #'(lambda () (setq unix-tzname-addr nil))
- ext:*after-save-initializations*)
- #+irix (declaim (notinline fakeout-compiler))
- #+irix (defun fakeout-compiler (name dst)
- (unless unix-tzname-addr
- (setf unix-tzname-addr (system:foreign-symbol-address
</span>- name
- :flavor :data)))
<span style="color: #000000;background-color: #ffdddd">- (deref (sap-alien unix-tzname-addr (array c-string 2)) dst))
- (def-alien-routine get-timezone c-call:void
</span>- (when c-call:long :in)
- (minutes-west c-call:int :out)
- (daylight-savings-p alien:boolean :out))
<span style="color: #000000;background-color: #ffdddd">- (defun unix-get-minutes-west (secs)
</span>- (multiple-value-bind (ignore minutes dst) (get-timezone secs)
- (declare (ignore ignore) (ignore dst))
- (values minutes))
- )
<span style="color: #000000;background-color: #ffdddd">- (defun unix-get-timezone (secs)
</span>- (multiple-value-bind (ignore minutes dst) (get-timezone secs)
- (declare (ignore ignore) (ignore minutes))
<span style="color: #000000;background-color: #ffdddd">- (values #-irix (deref unix-tzname (if dst 1 0))
- #+irix (fakeout-compiler "tzname" (if dst 1 0)))
</span>- ) )
-)
-
-
;;; Unix-setreuid sets the real and effective user-id's of the current
;;; process to the arguments "ruid" and "euid", respectively. Usage is
;;; restricted for anyone but the super-user. Setting either "ruid" or
<span style="color: #aaaaaa">@@ -1181,28 +1013,6 @@
</span> :dir (string (cast (slot result 'pw-dir) c-call:c-string))
:shell (string (cast (slot result 'pw-shell) c-call:c-string)))))))
-(def-alien-type nil
<span style="color: #000000;background-color: #ffdddd">- (struct utsname
- (sysname (array char #+svr4 257 #+bsd 256))
- (nodename (array char #+svr4 257 #+bsd 256))
- (release (array char #+svr4 257 #+bsd 256))
- (version (array char #+svr4 257 #+bsd 256))
- (machine (array char #+svr4 257 #+bsd 256))))
</span>-
-(defun unix-uname ()
<span style="color: #000000;background-color: #ffdddd">- (with-alien ((names (struct utsname)))
- (syscall* (#-(or freebsd (and x86 solaris)) "uname"
</span>- #+(and x86 solaris) "nuname" ; See /usr/include/sys/utsname.h
- #+freebsd "__xuname" #+freebsd int
- (* (struct utsname)))
- (values (cast (slot names 'sysname) c-string)
- (cast (slot names 'nodename) c-string)
- (cast (slot names 'release) c-string)
- (cast (slot names 'version) c-string)
- (cast (slot names 'machine) c-string))
- #+freebsd 256
- (addr names))))
-
#+(and solaris svr4)
(export '(unix-sysinfo
si-sysname si-hostname si-release si-version si-machine
</code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://gitlab.common-lisp.net/cmucl/cmucl/compare/c076d5501e7c12e8c9dcebbc30b117d0e9cc649d...a85043ace7efd4db54b9b3e60de66bbc6a0c4eeb">View it on GitLab</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":["merge_requests","issues","commit"],"url":"https://gitlab.common-lisp.net/cmucl/cmucl/compare/c076d5501e7c12e8c9dcebbc30b117d0e9cc649d...a85043ace7efd4db54b9b3e60de66bbc6a0c4eeb"}}</script>
</p>
</div>
</body>
</html>