From 0a67770d6954fd3113132fc7c7c5280bde532d95 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 30 Jul 2003 15:56:30 +0000 Subject: [PATCH] 0.8.2.9: We now build on FreeBSD again... ... by frobbing x86/c-call.lisp so that we can return 64-bit quantities for UNIX-LSEEK/lseek(); and while we're fixing 64-bitness... ... mmap takes an off_t argument, so grovel for that and use it, so fixing sb-simple-streams on Darwin and FreeBSD. --- NEWS | 2 ++ contrib/sb-posix/constants.lisp | 1 + contrib/sb-posix/interface.lisp | 2 +- contrib/sb-simple-streams/simple-stream-tests.lisp | 2 -- src/compiler/x86/c-call.lisp | 18 +++++------------- version.lisp-expr | 2 +- 6 files changed, 10 insertions(+), 17 deletions(-) diff --git a/NEWS b/NEWS index cf3979a..cdabc42 100644 --- a/NEWS +++ b/NEWS @@ -1951,6 +1951,8 @@ changes in sbcl-0.8.3 relative to sbcl-0.8.2: Kalle Olavi Niemitalo) * bug fix: the CLASS-PROTOTYPE of the GENERIC-FUNCTION class is now printable. (reported by Eric Marsden) + * bug fix in sb-posix: mmap() now works on systems with a 64-bit + off_t, including Darwin and FreeBSD. (thanks to Andreas Fuchs) planned incompatible changes in 0.8.x: * (not done yet, but planned:) When the profiling interface settles diff --git a/contrib/sb-posix/constants.lisp b/contrib/sb-posix/constants.lisp index a6284a8..a2df438 100644 --- a/contrib/sb-posix/constants.lisp +++ b/contrib/sb-posix/constants.lisp @@ -45,6 +45,7 @@ (:integer f-ok "F_OK") ;; mmap() + (:type off-t "off_t") (:integer prot-none "PROT_NONE" "mmap: no protection") (:integer prot-read "PROT_READ" "mmap: read protection") (:integer prot-write "PROT_WRITE" "mmap: write protection") diff --git a/contrib/sb-posix/interface.lisp b/contrib/sb-posix/interface.lisp index 98b4a5e..aac2314 100644 --- a/contrib/sb-posix/interface.lisp +++ b/contrib/sb-posix/interface.lisp @@ -83,7 +83,7 @@ (lambda (res) (= (sb-sys:sap-int res) #-alpha #XFFFFFFFF #+alpha #xffffffffffffffff)) (addr sap-or-nil) (length unsigned) (prot unsigned) - (flags unsigned) (fd file-descriptor) (offset int)) + (flags unsigned) (fd file-descriptor) (offset sb-posix::off-t)) (define-call "munmap" int minusp (start sb-sys:system-area-pointer) (length unsigned)) diff --git a/contrib/sb-simple-streams/simple-stream-tests.lisp b/contrib/sb-simple-streams/simple-stream-tests.lisp index 44b824d..010d0ab 100644 --- a/contrib/sb-simple-streams/simple-stream-tests.lisp +++ b/contrib/sb-simple-streams/simple-stream-tests.lisp @@ -87,8 +87,6 @@ result) t) -;;; FIXME -#-darwin (deftest create-read-mapped-file-1 ;; Read data via a mapped-file-simple-stream object. (let ((result t) diff --git a/src/compiler/x86/c-call.lisp b/src/compiler/x86/c-call.lisp index 3a4542f..b85d5b9 100644 --- a/src/compiler/x86/c-call.lisp +++ b/src/compiler/x86/c-call.lisp @@ -104,26 +104,18 @@ (setf (result-state-num-results state) (1+ num-results)) (my-make-wired-tn 'single-float 'single-reg (* num-results 2)))) -#+nil ;;pfw obsolete now? -(define-alien-type-method (values :result-tn) (type state) - (mapcar (lambda (type) - (invoke-alien-type-method :result-tn type state)) - (alien-values-type-values type))) - -;;; pfw - from alpha (define-alien-type-method (values :result-tn) (type state) (let ((values (alien-values-type-values type))) - (when (cdr values) + (when (> (length values) 2) (error "Too many result values from c-call.")) - (when values - (invoke-alien-type-method :result-tn (car values) state)))) + (mapcar (lambda (type) + (invoke-alien-type-method :result-tn type state)) + values))) (!def-vm-support-routine make-call-out-tns (type) (let ((arg-state (make-arg-state))) (collect ((arg-tns)) - (dolist #+nil ;; this reversed list seems to cause the alien botches!! - (arg-type (reverse (alien-fun-type-arg-types type))) - (arg-type (alien-fun-type-arg-types type)) + (dolist (arg-type (alien-fun-type-arg-types type)) (arg-tns (invoke-alien-type-method :arg-tn arg-type arg-state))) (values (my-make-wired-tn 'positive-fixnum 'any-reg esp-offset) (* (arg-state-stack-frame-size arg-state) n-word-bytes) diff --git a/version.lisp-expr b/version.lisp-expr index d9234c2..e4f59c7 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.2.8" +"0.8.2.9" -- 1.7.10.4