Update of /cvsroot/sbcl/sbcl/src/code
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9967/src/code
Modified Files:
unix.lisp
Log Message:
1.0.28.62: restore SYSCALL macros to the target build
Apparently there were other clients floating out in the wild.
Index: unix.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/unix.lisp,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- unix.lisp 20 May 2009 13:51:53 -0000 1.101
+++ unix.lisp 21 May 2009 01:50:52 -0000 1.102
@@ -56,9 +56,12 @@
;;; FIXME: The various FOO-SYSCALL-BAR macros, and perhaps some other
;;; macros in this file, are only used in this file, and could be
;;; implemented using SB!XC:DEFMACRO wrapped in EVAL-WHEN.
+;;;
+;;; SB-EXECUTABLE, at least, uses one of these macros; other libraries
+;;; and programs have been known to use them as well. Perhaps they
+;;; should live in SB-SYS or even SB-EXT?
-(eval-when (:compile-toplevel :execute)
-(sb!xc:defmacro syscall ((name &rest arg-types) success-form &rest args)
+(defmacro syscall ((name &rest arg-types) success-form &rest args)
`(locally
(declare (optimize (sb!c::float-accuracy 0)))
(let ((result (alien-funcall (extern-alien ,name (function int ,@arg-types))
@@ -70,7 +73,7 @@
;;; This is like SYSCALL, but if it fails, signal an error instead of
;;; returning error codes. Should only be used for syscalls that will
;;; never really get an error.
-(sb!xc:defmacro syscall* ((name &rest arg-types) success-form &rest args)
+(defmacro syscall* ((name &rest arg-types) success-form &rest args)
`(locally
(declare (optimize (sb!c::float-accuracy 0)))
(let ((result (alien-funcall (extern-alien ,name (function int ,@arg-types))
@@ -79,10 +82,10 @@
(error "Syscall ~A failed: ~A" ,name (strerror))
,success-form))))
-(sb!xc:defmacro int-syscall ((name &rest arg-types) &rest args)
+(defmacro int-syscall ((name &rest arg-types) &rest args)
`(syscall (,name ,@arg-types) (values result 0) ,@args))
-(sb!xc:defmacro with-restarted-syscall ((&optional (value (gensym))
+(defmacro with-restarted-syscall ((&optional (value (gensym))
(errno (gensym)))
syscall-form &rest body)
#!+sb-doc
@@ -94,10 +97,7 @@
(unless #!-win32 (eql ,errno sb!unix:eintr) #!+win32 nil
(return (values ,value ,errno))))
,@body))
-) ; EVAL-WHEN
-;;; FIXME: This could go in the above EVAL-WHEN, but it's used by
-;;; SB-EXECUTABLE.
(defmacro void-syscall ((name &rest arg-types) &rest args)
`(syscall (,name ,@arg-types) (values t 0) ,@args))
|