www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/07/12/14:37:05

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200107121836.UAA09468@father.ludd.luth.se>
Subject: Re: ls bug
In-Reply-To: <Pine.SUN.3.91.1010712131839.18737C-100000@is> from Eli Zaretskii at "Jul 12, 2001 01:21:57 pm"
To: djgpp-workers AT delorie DOT com
Date: Thu, 12 Jul 2001 20:36:52 +0200 (MET DST)
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

According to Eli Zaretskii:
> I'd begin by making sure that the reason is indeed the fact that st_size 
> is signed; what I said was just a hunch.
> 
> Specifically, if you write a test program which calls `stat' directly
> and interprets st_size as an unsigned value, do you get the correct 
> result for a file larger than 2GB?  (You could simply compile lstat.c 
> with -DTEST.)

Here it is:

./lstat 0 /ggg.hmm
DOS 7.10 (MS-DOS)
/ggg.hmm: 5 268435458 755 1 42 -1294967295 994841870 Wed Jul 11 10:57:50 2001
Cannot find SDA entry which corresponds to pathname (bad SDA pointer?)
Failed to get starting cluster number; inode defaults to hashing
(if no other messages were printed, then this is either an empty
file on a local disk drive, or a file on a networked drive, or
you run under some kind of DOS clone)

st_size is the value -1294967295 above.

After I've changed the test program in lstat.c to print it as unsigned
long I get:

DOS 7.10 (MS-DOS)
/ggg.hmm: 5 268435458 755 1 42 3000000001 994841870 Wed Jul 11 10:57:50 2001
Cannot find SDA entry which corresponds to pathname (bad SDA pointer?)
Failed to get starting cluster number; inode defaults to hashing
(if no other messages were printed, then this is either an empty
file on a local disk drive, or a file on a networked drive, or
you run under some kind of DOS clone)

3000000001 is correct.

> If the answer is YES, then the change should be probably done in `ls'.
> If not... well, we need another hunch.

Ok. Richard?


Right,

						MartinS

- Raw text -


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