0.8.2.9:
authorChristophe Rhodes <csr21@cam.ac.uk>
Wed, 30 Jul 2003 15:56:30 +0000 (15:56 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Wed, 30 Jul 2003 15:56:30 +0000 (15:56 +0000)
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
contrib/sb-posix/constants.lisp
contrib/sb-posix/interface.lisp
contrib/sb-simple-streams/simple-stream-tests.lisp
src/compiler/x86/c-call.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index cf3979a..cdabc42 100644 (file)
--- 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
index a6284a8..a2df438 100644 (file)
@@ -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")
index 98b4a5e..aac2314 100644 (file)
@@ -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))
index 44b824d..010d0ab 100644 (file)
@@ -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)
index 3a4542f..b85d5b9 100644 (file)
     (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)
index d9234c2..e4f59c7 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.2.8"
+"0.8.2.9"