Mail Archives: djgpp-workers/2001/08/26/17:44:42
I re-worked the fstat patch. Please comment on new version. This fixes
problem of fstat failing with -1 on pre-opened redirected device handles.
Example: stdin if prog < nul, stdout if prog > nul.
The old version had an ugly goto, unneeded call when dev_info was
already in a variable, and actually missed some cases using
various SFT flags. If we don't have trusted values at this point we will
fail below unless it's a device.
*** fstat.c_ Fri Aug 17 19:40:32 2001
--- fstat.c Sun Aug 26 16:17:58 2001
*************** fstat_assist(int fhandle, struct stat *s
*** 423,428 ****
--- 423,431 ----
is_remote = 1;
else
is_remote = 0;
+
+ if(!have_trusted_values && dev_info == 0 && _get_dos_version(1) == 0x532)
+ is_dev = 1; /* Device under NT or Win2K with pre-open/lfn handle. */
}
/* First, fill the fields which are constant under DOS. */
- Raw text -