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

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: <00e701c0af39$37a01a90$9865fea9@edward>
From: "edward" <tailbert AT yahoo DOT com>
To: <cygwin-apps AT cygwin DOT com>
Subject: Re: [PATCH] du reports incorrect sizes (oops)
Date: Sat, 17 Mar 2001 18:23:01 -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

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" <tailbert AT yahoo DOT com>
To: <cygwin-apps AT cygwin DOT com>
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
> 
> 

- Raw text -


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