Update of /cvsroot/sbcl/sbcl/contrib/sb-grovel
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9557/contrib/sb-grovel
Modified Files:
def-to-lisp.lisp
Log Message:
1.0.13.2: Removing UNIX-NAMESTRING, part 3 (sort of)
* Add condition classes to SB-POSIX that are subclasses of FILE-ERROR,
to give more precise information than vanilla FILE-ERRORs after
users load SB-POSIX.
* Add code to sb-grovel in support of same.
Index: def-to-lisp.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/contrib/sb-grovel/def-to-lisp.lisp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- def-to-lisp.lisp 26 Oct 2007 04:33:34 -0000 1.27
+++ def-to-lisp.lisp 30 Dec 2007 05:32:29 -0000 1.28
@@ -112,10 +112,12 @@
(dolist (def definitions)
(destructuring-bind (type lispname cname &optional doc export) def
(case type
- (:integer
+ ((:integer :errno)
(as-c "#ifdef" cname)
(printf "(cl:defconstant ~A %d \"~A\")" lispname doc
cname)
+ (when (eql type :errno)
+ (printf "(cl:setf (get '~A 'errno) t)" lispname))
(as-c "#else")
(printf "(sb-int:style-warn \"Couldn't grovel for ~A (unknown to the C compiler).\")" cname)
(as-c "#endif"))
|