From: Cyrus H. <sl...@us...> - 2007-04-05 00:33:31
|
Update of /cvsroot/sbcl/sbcl/src/runtime In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32366/src/runtime Modified Files: wrap.c Log Message: 1.0.4.26: fix wrapped stat struct for darwin * 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 Index: wrap.c =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/runtime/wrap.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- wrap.c 12 Nov 2006 23:04:59 -0000 1.22 +++ wrap.c 5 Apr 2007 00:33:21 -0000 1.23 @@ -173,11 +173,20 @@ #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 @@ #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 */ |