delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/03/17/18:08:01

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: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Message-ID: <00c501c0af37$2e1787d0$9865fea9@edward>
From: "edward" <tailbert AT yahoo DOT com>
To: <cygwin-apps AT cygwin DOT com>
Subject: [PATCH] du reports incorrect sizes
Date: Sat, 17 Mar 2001 18:08:28 -0500
MIME-Version: 1.0
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019