0.8.4.5:
authorChristophe Rhodes <csr21@cam.ac.uk>
Fri, 3 Oct 2003 12:19:59 +0000 (12:19 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Fri, 3 Oct 2003 12:19:59 +0000 (12:19 +0000)
Make simple-streams work on alpha
... really ensure the various ffi_foo_t types for wrapped_stat
are 32-bit everywhere
... update the lisp version of the struct definition to believe
this, too (UNSIGNED-INT, not UNSIGNED-LONG)
... also bugfix: MOST-POSITIVE-FIXNUM is an upper exclusive bound
... stray arch_os_get_current_thread() fix

contrib/sb-simple-streams/file.lisp
src/code/unix.lisp
src/runtime/alpha-linux-os.c
src/runtime/wrap.c
version.lisp-expr

index 22099af..5fd3d70 100644 (file)
            (sb-ext:cancel-finalization stream)
            (error "Error fstating ~S: ~A" stream
                   (sb-int:strerror dev)))
-         (when (> size most-positive-fixnum)
+         (when (>= size most-positive-fixnum)
            ;; Or else BUF-LEN has to be a general integer, or
            ;; maybe (unsigned-byte 32).  In any case, this means
            ;; BUF-MAX and BUF-PTR have to be the same, which means
            ;; bigger files, anyway.  Maybe DEVICE-READ can adjust
            ;; the mapped portion of the file when necessary?
            (warn "Unable to memory-map entire file.")
-           (setf size most-positive-fixnum))
+           (setf size (1- most-positive-fixnum)))
          (let ((buffer
                 (handler-case
                   (sb-posix:mmap nil size prot sb-posix::MAP-SHARED fd 0)
index 9199ccb..a752549 100644 (file)
 ;;; longer than 32 bits anyway, right?":-|
 (define-alien-type nil
   (struct wrapped_stat
-    (st-dev unsigned-long)              ; would be dev-t in a real stat
+    (st-dev unsigned-int)              ; would be dev-t in a real stat
     (st-ino ino-t)
     (st-mode mode-t)
     (st-nlink  nlink-t)
     (st-uid  uid-t)
     (st-gid  gid-t)
-    (st-rdev unsigned-long)             ; would be dev-t in a real stat
-    (st-size unsigned-long)            ; would be off-t in a real stat
+    (st-rdev unsigned-int)             ; would be dev-t in a real stat
+    (st-size unsigned-int)             ; would be off-t in a real stat
     (st-blksize unsigned-long)
     (st-blocks unsigned-long)
     (st-atime time-t)
index 9f1e586..99c8856 100644 (file)
@@ -42,9 +42,6 @@ size_t os_vm_page_size;
 #ifdef LISP_FEATURE_SB_THREAD
 #error "Define threading support functions"
 #else
-struct thread *arch_os_get_current_thread() {
-    return all_threads;
-}
 int arch_os_thread_init(struct thread *thread) {
     return 1;                  /* success */
 }
index a3d8881..c472309 100644 (file)
@@ -150,8 +150,11 @@ wrapped_readlink(char *path)
  * when values are small.
  *
  * FIXME: But of course we should fix the FFI so that we can use the
- * actual 64-bit values instead. */
-typedef long ffi_dev_t; /* since Linux dev_t can be 64 bits */
+ * actual 64-bit values instead.  In fact, we probably have by now
+ * (2003-10-03) on all working platforms except MIPS and HPPA; if some
+ * motivated spark would simply fix those, this hack could go away.
+ * -- CSR, 2003-10-03 */
+typedef u32 ffi_dev_t; /* since Linux dev_t can be 64 bits */
 typedef u32 ffi_off_t; /* since OpenBSD 2.8 st_size is 64 bits */
 
 /* a representation of stat(2) results which doesn't depend on CPU or OS */
index 269edf6..a04ff04 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.4.5"
+"0.8.4.6"