0.9.5.49:
authorThiemo Seufer <ths@networkno.de>
Wed, 12 Oct 2005 15:12:17 +0000 (15:12 +0000)
committerThiemo Seufer <ths@networkno.de>
Wed, 12 Oct 2005 15:12:17 +0000 (15:12 +0000)
Add mips-specific ugliness to stat(2) wrapper handling.

src/code/unix.lisp
src/runtime/wrap.c
version.lisp-expr

index f411a38..e6dfddf 100644 (file)
@@ -573,14 +573,23 @@ SYSCALL-FORM. Repeat evaluation of SYSCALL-FORM if it is interrupted."
 ;;; longer than 32 bits anyway, right?":-|
 (define-alien-type nil
   (struct wrapped_stat
+    #!-mips
     (st-dev unsigned-int)              ; would be dev-t in a real stat
+    #!+mips
+    (st-dev unsigned-long)             ; this is _not_ a dev-t on mips
     (st-ino ino-t)
     (st-mode mode-t)
-    (st-nlink  nlink-t)
-    (st-uid  uid-t)
-    (st-gid  gid-t)
+    (st-nlink nlink-t)
+    (st-uid uid-t)
+    (st-gid gid-t)
+    #!-mips
     (st-rdev unsigned-int)             ; would be dev-t in a real stat
+    #!+mips
+    (st-rdev unsigned-long)             ; this is _not_ a dev-t on mips
+    #!-mips
     (st-size unsigned-int)              ; would be off-t in a real stat
+    #!+mips
+    (st-size off-t)
     (st-blksize unsigned-long)
     (st-blocks unsigned-long)
     (st-atime time-t)
index 2b90248..365d895 100644 (file)
@@ -155,9 +155,17 @@ wrapped_readlink(char *path)
  * 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 */
+ * -- CSR, 2003-10-03
+ *
+ * Some motivated spark fixed MIPS. -- ths, 2005-10-06 */
+
+#ifdef LISP_FEATURE_MIPS
+typedef unsigned long ffi_dev_t; /* Linux/MIPS struct stat doesn't use dev_t */
+typedef off_t ffi_off_t;
+#else
 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 */
+#endif
 
 /* a representation of stat(2) results which doesn't depend on CPU or OS */
 struct stat_wrapper {
index c61f131..1368416 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.9.5.48"
+"0.9.5.49"