sigh. my brain is off. this patch is probably better. --- system.h.orig Sat Mar 17 18:22:02 2001 +++ system.h Sat Mar 17 18:17:27 2001 @@ -337,7 +337,11 @@ #endif #ifndef ST_NBLOCKSIZE -# define ST_NBLOCKSIZE 512 +# if defined(S_BLKSIZE) +# define ST_NBLOCKSIZE S_BLKSIZE +# else +# define ST_NBLOCKSIZE 512 +# endif #endif #include "sys2.h" ----- Original Message ----- From: "edward" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 17, 2001 6:08 PM Subject: [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 > >
