Mail Archives: djgpp-workers/2001/07/12/14:37:05
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 -