From: Daniel Barlow Date: Thu, 8 May 2003 20:37:54 +0000 (+0000) Subject: 0.8alpha.0.22 X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=9d99a615347ab6c62a783309badc6b1d59d57c29;p=sbcl.git 0.8alpha.0.22 SB-GROVEL-related changes ... make sb-bsd-sockets use it ... which involved restoring size-of-{int,char,long} constants When building contrib, reset the central-registry to avoid picking up any code from e.g. ~/.sbcl/systems/ --- diff --git a/contrib/asdf-module.mk b/contrib/asdf-module.mk index 6179c56..8ae4fa6 100644 --- a/contrib/asdf-module.mk +++ b/contrib/asdf-module.mk @@ -3,8 +3,10 @@ export CC all: $(MAKE) -C ../asdf - echo "(asdf:operate 'asdf:load-op :$(SYSTEM) :force t)" | \ - $(SBCL) --eval '(load "../asdf/asdf")' + $(SBCL) --eval '(load "../asdf/asdf")' \ + --eval "(setf asdf::*central-registry* '((MERGE-PATHNAMES \"systems/\" (TRUENAME (SB-EXT:POSIX-GETENV \"SBCL_HOME\")))))" \ + --eval "(asdf:operate 'asdf:load-op :$(SYSTEM) :force t)" \ + --eval "(quit)" test: all echo "(asdf:operate (quote asdf:load-op) :$(SYSTEM)) "\ diff --git a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd index 6cc6b22..c0eb896 100644 --- a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd +++ b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd @@ -1,41 +1,9 @@ ;;; -*- Lisp -*- - -(defpackage #:sb-bsd-sockets-system (:use #:asdf #:cl)) +(eval-when (:compile-toplevel :load-toplevel :execute) + (require :sb-grovel)) +(defpackage #:sb-bsd-sockets-system (:use #:asdf #:sb-grovel #:cl)) (in-package #:sb-bsd-sockets-system) -;;; constants.lisp requires special treatment - -(defclass constants-file (cl-source-file) ()) - -(defmethod perform ((op compile-op) (component constants-file)) - ;; we want to generate all our temporary files in the fasl directory - ;; because that's where we have write permission. Can't use /tmp; - ;; it's insecure (these files will later be owned by root) - (let* ((output-file (car (output-files op component))) - (filename (component-pathname component)) - (real-output-file - (if (typep output-file 'logical-pathname) - (translate-logical-pathname output-file) - (pathname output-file))) - (tmp-c-source (merge-pathnames #p"foo.c" real-output-file)) - (tmp-a-dot-out (merge-pathnames #p"a.out" real-output-file)) - (tmp-constants (merge-pathnames #p"constants.lisp-temp" - real-output-file))) - (princ (list filename output-file real-output-file - tmp-c-source tmp-a-dot-out tmp-constants)) - (terpri) - (funcall (intern "C-CONSTANTS-EXTRACT" - (find-package "SB-BSD-SOCKETS-SYSTEM")) - filename tmp-c-source :sb-bsd-sockets-internal) - (and - (= (run-shell-command "gcc -o ~S ~S" (namestring tmp-a-dot-out) - (namestring tmp-c-source)) 0) - (= (run-shell-command "~A >~A" - (namestring tmp-a-dot-out) - (namestring tmp-constants)) 0) - (compile-file tmp-constants :output-file output-file)))) - - ;;; we also have a shared library with some .o files in it (defclass unix-dso (module) ()) @@ -94,7 +62,7 @@ (defsystem sb-bsd-sockets :version "0.58" - :depends-on (sb-rt) + :depends-on (sb-rt sb-grovel) :components ((:file "defpackage") (:file "split" :depends-on ("defpackage")) (:file "array-data" :depends-on ("defpackage")) @@ -103,10 +71,10 @@ (:c-source-file "get-h-errno"))) (:file "malloc" :depends-on ("defpackage")) (:file "foreign-glue" :depends-on ("defpackage" "malloc")) - (:constants-file "constants" - :pathname "constants.lisp" - :depends-on - ("def-to-lisp" "defpackage" "foreign-glue")) + (sb-grovel:grovel-constants-file + "constants" + :package :sockint :pathname "constants.lisp" + :depends-on ("def-to-lisp" "defpackage" "foreign-glue")) (:file "sockets" :depends-on ("constants" "array-data")) diff --git a/contrib/sb-grovel/def-to-lisp.lisp b/contrib/sb-grovel/def-to-lisp.lisp index 337d5c7..e8b49d4 100644 --- a/contrib/sb-grovel/def-to-lisp.lisp +++ b/contrib/sb-grovel/def-to-lisp.lisp @@ -43,8 +43,11 @@ (format stream "main() { ~% printf(\"(in-package ~S)\\\n\");~%" package-name) (format stream "printf(\"(cl:deftype int () '(%ssigned-byte %d))\\\n\",SIGNED_(int),8*sizeof (int));~%") - (format stream "printf(\"(cl:deftype char () '(unsigned-byte %d))\\\n\",SIGNED_(char),8*sizeof (char));~%") - (format stream "printf(\"(cl:deftype long () '(unsigned-byte %d))\\\n\",SIGNED_(long),8*sizeof (long));~%") + (format stream "printf(\"(cl:deftype char () '(%ssigned-byte %d))\\\n\",SIGNED_(char),8*sizeof (char));~%") + (format stream "printf(\"(cl:deftype long () '(%ssigned-byte %d))\\\n\",SIGNED_(long),8*sizeof (long));~%") + (format stream "printf(\"(cl:defconstant size-of-int %d)\\\n\",sizeof (int));~%") + (format stream "printf(\"(cl:defconstant size-of-char %d)\\\n\",sizeof (char));~%") + (format stream "printf(\"(cl:defconstant size-of-long %d)\\\n\",sizeof (long));~%") (dolist (def definitions) (destructuring-bind (type lispname cname &optional doc) def (cond ((eq type :integer) diff --git a/version.lisp-expr b/version.lisp-expr index b7125f7..e451eef 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.8alpha.0.21" +"0.8alpha.0.22"