This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] du reports incorrect sizes


not sure where to send this. can't seem to find the proper place for it.

/usr/local/bin/du is the patched version.

+ /bin/du --version
du (GNU fileutils) 4.0
+ ls -ld xemacs.exe
-rwxrwxrwx   1 edward   None      7238775 Mar  5 22:28 xemacs.exe
+ /bin/du xemacs.exe
3535 xemacs.exe
+ /usr/local/bin/du xemacs.exe
7070 xemacs.exe
+ /bin/du --block-size=512 xemacs.exe
7070 xemacs.exe
+ /usr/local/bin/du --block-size=512 xemacs.exe
14140 xemacs.exe
+ POSIXLY_CORRECT=1 /bin/du xemacs.exe
7070 xemacs.exe
+ POSIXLY_CORRECT=1 /usr/local/bin/du xemacs.exe
14140 xemacs.exe
+ /bin/du -k xemacs.exe
3535 xemacs.exe
+ /usr/local/bin/du -k xemacs.exe
7070 xemacs.exe
+ /bin/du --block-size=1024 xemacs.exe
3535 xemacs.exe
+ /usr/local/bin/du --block-size=1024 xemacs.exe
7070 xemacs.exe

patch against ftp.gnu.org's fileutils-4.0 below.

--- system.h~ Sat Aug 29 23:13:45 1998
+++ system.h Fri Mar 16 07:22:36 2001
@@ -316,7 +316,7 @@
 /* Some systems, like Sequents, return st_blksize of 0 on pipes. */
 # define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \
           ? (statbuf).st_blksize : DEV_BSIZE)
-# if defined(hpux) || defined(__hpux__) || defined(__hpux)
+# if defined(hpux) || defined(__hpux__) || defined(__hpux) ||
defined(__CYGWIN__)
 /* HP-UX counts st_blocks in 1024-byte units.
    This loses when mixing HP-UX and BSD filesystems with NFS.  */
 #  define ST_NBLOCKSIZE 1024



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]