0.8.0.7:
authorChristophe Rhodes <csr21@cam.ac.uk>
Tue, 27 May 2003 09:20:01 +0000 (09:20 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Tue, 27 May 2003 09:20:01 +0000 (09:20 +0000)
Various contrib/ fixes
... isolate the sb-bsd-sockets tests from the rest of the
system, so that they're not included in the
sb-simple-streams tests. (thanks to Rudi Schlatte)
... replace asm/errno.h with errno.h include in
sb-simple-streams. (thanks to Rudi Schlatte)
... make sb-grovel more likely to emit C9x compliant code, by
minimizing rightward drift.

contrib/sb-bsd-sockets/sb-bsd-sockets.asd
contrib/sb-grovel/def-to-lisp.lisp
contrib/sb-simple-streams/constants.lisp
version.lisp-expr

index 4aa65e1..03c32c7 100644 (file)
@@ -62,7 +62,7 @@
 
 (defsystem sb-bsd-sockets
     :version "0.58"
-    :depends-on (sb-rt sb-grovel)
+    :depends-on (sb-grovel)
     :components ((:file "defpackage")
                 (:file "split" :depends-on ("defpackage"))
                  (:file "array-data" :depends-on ("defpackage"))
@@ -85,7 +85,6 @@
                 (:file "misc" :depends-on ("sockets" "constants"))
 
                 (:file "def-to-lisp")
-                (:file "tests" :depends-on ("inet" "sockopt"))
 
                 (:static-file "NEWS")
                 ;; (:static-file "INSTALL")
   (provide 'sb-bsd-sockets))
 
 (defmethod perform ((o test-op) (c (eql (find-system :sb-bsd-sockets))))
+  (operate 'load-op 'sb-bsd-sockets-tests)
+  (operate 'test-op 'sb-bsd-sockets-tests))
+
+(defsystem sb-bsd-sockets-tests
+  :depends-on (sb-rt sb-bsd-sockets)
+  :components ((:file "tests")))
+
+(defmethod perform ((o test-op) (c (eql (find-system :sb-bsd-sockets-tests))))
   (or (funcall (intern "DO-TESTS" (find-package "SB-RT")))
       (error "test-op failed")))
-
index e8b49d4..2440775 100644 (file)
@@ -6,7 +6,13 @@
     (format stream "printf(\"(sb-grovel::define-c-struct ~A %d)\\n\",sizeof (~A));~%" lisp-name c-name)
     (dolist (e elements)
       (destructuring-bind (lisp-type lisp-el-name c-type c-el-name) e
-        (format stream "printf(\"(sb-grovel::define-c-accessor ~A-~A ~A ~A \");~%"
+       ;; FIXME: this format string doesn't actually guarantee
+       ;; non-multilined-string-constantness, it just makes it more
+       ;; likely.  Sort out the required behaviour (and maybe make
+       ;; the generated C more readable, while we're at it...) --
+       ;; CSR, 2003-05-27
+        (format stream "printf(\"(sb-grovel::define-c-accessor ~A-~A\\n\\~%  ~
+                        ~A ~A \");~%"
                 lisp-name lisp-el-name lisp-name lisp-type)
         ;; offset
         (format stream "{ ~A t;printf(\"%d \",((unsigned long)&(t.~A)) - ((unsigned long)&(t)) ); }~%"
 
 (defun c-for-function (stream lisp-name alien-defn)
   (destructuring-bind (c-name &rest definition) alien-defn
-    (let ((*print-right-margin* nil))
-      (format stream "printf(\"(cl:declaim (cl:inline ~A))\\n\");~%"
-              lisp-name)
-      (princ "printf(\"(sb-grovel::define-foreign-routine (" stream)
-      (princ "\\\"" stream) (princ c-name stream) (princ "\\\" " stream)
-      (princ lisp-name stream)
-      (princ " ) " stream)
-      (terpri stream)
-      (dolist (d definition)
-        (write d :length nil
-               :right-margin nil :stream stream)
-        (princ " " stream))
-      (format stream ")\\n\");")
-      (terpri stream))))
-
+    (format stream "printf(\"(cl:declaim (cl:inline ~A))\\n\");~%" lisp-name)
+    (format stream
+           "printf(\"(sb-grovel::define-foreign-routine (\\\"~A\\\" ~A)\\n\\~%~
+            ~{  ~W~^\\n\\~%~})\\n\");~%"
+           c-name lisp-name definition)))
 
 (defun print-c-source (stream headers definitions package-name)
   (let ((*print-right-margin* nil))
@@ -69,7 +65,7 @@ printf(\"(in-package ~S)\\\n\");~%" package-name)
               (t
                (format stream
                        "printf(\";; Non hablo Espagnol, Monsieur~%")))))
-    (format stream "exit(0);~%}")))
+    (format stream "exit(0);~%}~%")))
 
 (defun c-constants-extract  (filename output-file package)
   (with-open-file (f output-file :direction :output)
index c613729..663726b 100644 (file)
@@ -13,7 +13,7 @@
 ;;; unix.lisp, should presumably end up somewhere else, either in sbcl
 ;;; itself or in sb-posix.
 
-("stdio.h" "sys/types.h" "sys/stat.h" "fcntl.h" "asm/errno.h" "sys/mman.h")
+("stdio.h" "sys/types.h" "sys/stat.h" "fcntl.h" "errno.h" "sys/mman.h")
 
 ((:integer eacces "EACCES" "Error code for access error")
  (:integer prot-none "PROT_NONE" "mmap: no protection")
index 0e77a48..738c035 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.0.6"
+"0.8.0.7"