From: Christophe Rhodes Date: Tue, 27 May 2003 09:20:01 +0000 (+0000) Subject: 0.8.0.7: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=d1de626e8dcd1ab98ceedf818f055f64f3060a7b;p=sbcl.git 0.8.0.7: 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. --- diff --git a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd index 4aa65e1..03c32c7 100644 --- a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd +++ b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd @@ -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") @@ -98,6 +97,13 @@ (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"))) - diff --git a/contrib/sb-grovel/def-to-lisp.lisp b/contrib/sb-grovel/def-to-lisp.lisp index e8b49d4..2440775 100644 --- a/contrib/sb-grovel/def-to-lisp.lisp +++ b/contrib/sb-grovel/def-to-lisp.lisp @@ -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)) ); }~%" @@ -18,21 +24,11 @@ (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) diff --git a/contrib/sb-simple-streams/constants.lisp b/contrib/sb-simple-streams/constants.lisp index c613729..663726b 100644 --- a/contrib/sb-simple-streams/constants.lisp +++ b/contrib/sb-simple-streams/constants.lisp @@ -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") diff --git a/version.lisp-expr b/version.lisp-expr index 0e77a48..738c035 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"