[cmucl-cvs] CMUCL commit: src/code (unix.lisp)

Raymond Toy rtoy at common-lisp.net
Fri Nov 12 16:53:17 UTC 2010


    Date: Friday, November 12, 2010 @ 11:53:17
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/code

Modified: unix.lisp

Fix padding for stat64.  st-pad2 was the wrong size to pad st-size to
a 64-bit boundary.  Add st-pad3 to make sure st-blocks is on a 64-bit
boundary. 

Only a problem when cross-compiling from a different arch.  The native
compile correctly padded the fields.


-----------+
 unix.lisp |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


Index: src/code/unix.lisp
diff -u src/code/unix.lisp:1.130 src/code/unix.lisp:1.131
--- src/code/unix.lisp:1.130	Tue Apr 20 13:57:45 2010
+++ src/code/unix.lisp	Fri Nov 12 11:53:17 2010
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /project/cmucl/cvsroot/src/code/unix.lisp,v 1.130 2010-04-20 17:57:45 rtoy Rel $")
+  "$Header: /project/cmucl/cvsroot/src/code/unix.lisp,v 1.131 2010-11-12 16:53:17 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -567,19 +567,20 @@
 (def-alien-type nil
   (struct stat64
     (st-dev dev-t)
-    (st-pad1 (array long 3))
+    (st-pad1 (array long 3))		; Pad so ino is 64-bit aligned
     (st-ino ino64-t)
     (st-mode unsigned-long)
     (st-nlink short)
     (st-uid uid-t)
     (st-gid gid-t)
     (st-rdev dev-t)
-    (st-pad2 (array long 2))
+    (st-pad2 (array long 3))		; Pad so size is 64-bit aligned
     (st-size off64-t)
     (st-atime (struct timestruc-t))
     (st-mtime (struct timestruc-t))
     (st-ctime (struct timestruc-t))
     (st-blksize long)
+    (st-pad3 (array long 1))		; Pad so blocks is 64-bit aligned
     (st-blocks blkcnt64-t)
     (st-fstype (array char 16))
     (st-pad4 (array long 8))))




More information about the cmucl-cvs mailing list