1.0.4.26: fix wrapped stat struct for darwin
authorCyrus Harmon <ch-sbcl@bobobeach.com>
Thu, 5 Apr 2007 00:33:21 +0000 (00:33 +0000)
committerCyrus Harmon <ch-sbcl@bobobeach.com>
Thu, 5 Apr 2007 00:33:21 +0000 (00:33 +0000)
 * st-size should be on off-t on darwin, instead of unsigned-int and
   st-blksize should be an unsigned-int instead of an unsigned-long
 * use dev_t and off_t on darwin to figure out the size of st_rdev and
   st_size
 * add ffi_blksize_t for wrapped_st_blksize

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

index 26fae5c..5147726 100644 (file)
@@ -641,8 +641,11 @@ SYSCALL-FORM. Repeat evaluation of SYSCALL-FORM if it is interrupted."
     (st-rdev #!-(or mips largefile) unsigned-int
              #!+mips unsigned-long
              #!+largefile dev-t)
-    (st-size #!-(or mips largefile) unsigned-int
-             #!+(or mips largefile) off-t)
+    (st-size #!-(or darwin mips largefile) unsigned-int
+             #!+(or darwin mips largefile) off-t)
+    #!+(and darwin)
+    (st-blksize unsigned-int)
+    #!-(and darwin)
     (st-blksize unsigned-long)
     (st-blocks unsigned-long)
     (st-atime time-t)
index f0e5746..93c6bcf 100644 (file)
@@ -173,11 +173,20 @@ typedef off_t ffi_off_t;
 #elif defined(LISP_FEATURE_MIPS)
 typedef unsigned long ffi_dev_t; /* Linux/MIPS struct stat doesn't use dev_t */
 typedef off_t ffi_off_t;
+#elif defined(LISP_FEATURE_DARWIN)
+typedef dev_t ffi_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
 
+#if defined(LISP_FEATURE_DARWIN)
+typedef blksize_t ffi_blksize_t;
+#else
+typedef unsigned long ffi_blksize_t;
+#endif
+
 /* a representation of stat(2) results which doesn't depend on CPU or OS */
 struct stat_wrapper {
     /* KLUDGE: The verbose wrapped_st_ prefixes are to protect us from
@@ -204,7 +213,7 @@ struct stat_wrapper {
 #endif
     ffi_dev_t     wrapped_st_rdev;        /* device type (if inode device) */
     ffi_off_t     wrapped_st_size;        /* total size, in bytes */
-    unsigned long wrapped_st_blksize;     /* blocksize for filesystem I/O */
+    ffi_blksize_t wrapped_st_blksize;     /* blocksize for filesystem I/O */
     unsigned long wrapped_st_blocks;      /* number of blocks allocated */
     time_t        wrapped_st_atime;       /* time_t of last access */
     time_t        wrapped_st_mtime;       /* time_t of last modification */
index bbf73fd..256af82 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".)
-"1.0.4.25"
+"1.0.4.26"