Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Message-ID: <00c501c0af37$2e1787d0$9865fea9@edward> From: "edward" To: Subject: [PATCH] du reports incorrect sizes Date: Sat, 17 Mar 2001 18:08:28 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Apparently-From: Swiftnsavv AT aol DOT com 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