0.8.0.45
[sbcl.git] / src / code / unix.lisp
index 4dce234..382d034 100644 (file)
 ;;;  L_XTND    Extend the file size.
 (defun unix-lseek (fd offset whence)
   (declare (type unix-fd fd)
-          (type (unsigned-byte 32) offset)
           (type (integer 0 2) whence))
-  #!-(and x86 bsd)
-  (int-syscall ("lseek" int off-t int) fd offset whence)
-  ;; Need a 64-bit return value type for this. TBD. For now,
-  ;; don't use this with any 2G+ partitions.
-  #!+(and x86 bsd)
-  (int-syscall ("lseek" int unsigned-long unsigned-long int)
-              fd offset 0 whence))
+  (int-syscall ("lseek" int off-t int) fd offset whence))
 
 ;;; UNIX-READ accepts a file descriptor, a buffer, and the length to read.
 ;;; It attempts to read len bytes from the device associated with fd
 ;;; information.
 (defun unix-ioctl (fd cmd arg)
   (declare (type unix-fd fd)
-          (type (unsigned-byte 32) cmd))
-  (void-syscall ("ioctl" int unsigned-int (* char)) fd cmd arg))
+          (type (signed-byte 32) cmd))
+  (void-syscall ("ioctl" int signed-int (* char)) fd cmd arg))
 \f
 ;;;; sys/resource.h
 
                        (slot (slot itvo 'it-value) 'tv-usec))
                which (alien-sap (addr itvn))(alien-sap (addr itvo))))))
 
-(defmacro with-timeout (expires &body body)
+(defmacro sb!ext::with-timeout (expires &body body)
   "Execute the body, interrupting it with a SIGALRM after at least
 EXPIRES seconds have passed.  Uses Unix setitimer(), restoring any
 previous timer after the body has finished executing"
-  (let ((saved-seconds (gensym "SAVED-SECONDS"))
-       (saved-useconds (gensym "SAVED-USECONDS"))
-       (s (gensym "S")) (u (gensym "U")))
+  (with-unique-names (saved-seconds saved-useconds s u)
     `(let (- ,saved-seconds ,saved-useconds)
       (multiple-value-setq (- - - ,saved-seconds ,saved-useconds)
        (unix-getitimer :real))