* fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call fstat_by_name

if fd is not opened to allow fstat_by_name to properly set errno.
* fhandler.cc (binmode): Default to binmode when mode is not known.
This commit is contained in:
Christopher Faylor
2002-05-31 00:15:22 +00:00
parent 53e05aecc1
commit 5d8c7a56c2
3 changed files with 14 additions and 4 deletions

View File

@ -434,7 +434,7 @@ fhandler_base::open (path_conv *pc, int flags, mode_t mode)
else if (fmode & O_TEXT)
bin = O_TEXT;
else if (get_device () == FH_DISK)
bin = get_w_binary () || get_r_binary ();
bin = get_w_binary () || get_r_binary () || O_BINARY;
else
bin = (binmode == O_BINARY) || get_w_binary () || get_r_binary ();