Mail Archives: djgpp-workers/1996/03/17/08:44:10
On Wed, 13 Mar 1996, Mat Hostetter wrote:
> We have discovered that doing a `stat' of a nonexistent file always
> returns 0 under WinNT (in full screen mode), when it should of course
> return -1. This is taking place on a normal FAT volume.
What does `stat' return in the `struct stat'? Does it think this is a
file? a directory? a volume label? If it's a directory, does it seem like
`stat' decides it's a root directory (the inode number is 1 for root
directories)? Which bits did `stat' set in the `_djstat_fail_bits'
variable?
To test the above, you might take stat.c from the library sources and
compile it with -DTEST. It will produce an executable test program which
you should invoke thusly:
stat 0 file ...
(0 is the value of the bit-mapped variable `_djstat_flags' that controls
the behavior of `stat'; it is documented in the library on-line docs).
The program will then stat each of the files from the command line and
print (most of) the contents of `struct stat', together with a
human-readable description of the bits set in `_djstat_fail_bits'. Please
post the info so that I could isolate the problem (I don't have access to
a WinNT machine).
- Raw text -