Mail Archives: djgpp-workers/1997/02/16/19:26:44
Eli Zaretskii wrote:
> You will have to debug this a bit more, sorry. I can understand weird
> things happening with st_mode, since `fstat' does some trickery to get at
> the attribute bits, but zero st_size? That just seems impossible, since
> `fstat' simply calls `filelength' (which is just a call to DOS seek
> functions in disguise) to get the file size, so I fail to see how that
> could fail. Can you step into `fstat' code, or put some debugging
> printf's there, and see what exactly happens in these cases? Thanks.
>
Filelength is returning the right size, but since the "is device" flag
bit is set, it never makes it into the st_size field. Just putting the
size into the st_size field won't fix it though, because my code checks
to see if it's a regular file before returning the size.
I'm guessing that the field from which fstat determines if the handle is
a device or not has been changed on NT.
- Raw text -