* 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:
		| @@ -1,3 +1,9 @@ | |||||||
|  | 2002-05-30  Christopher Faylor  <cgf@redhat.com> | ||||||
|  |  | ||||||
|  | 	* 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. | ||||||
|  |  | ||||||
| 2002-05-30  Corinna Vinschen  <corinna@vinschen.de> | 2002-05-30  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	* autoload.cc: Replace autoload statments for ZwXXX by NtXXX. | 	* autoload.cc: Replace autoload statments for ZwXXX by NtXXX. | ||||||
| @@ -17,6 +23,10 @@ | |||||||
| 	* pinfo.cc (winpids::enumNT): Replace call to ZwQuerySystemInformation | 	* pinfo.cc (winpids::enumNT): Replace call to ZwQuerySystemInformation | ||||||
| 	by call to NtQuerySystemInformation. | 	by call to NtQuerySystemInformation. | ||||||
|  |  | ||||||
|  | 2002-05-29  Christopher Faylor  <cgf@redhat.com> | ||||||
|  |  | ||||||
|  | 	* fhandler.cc (binmode): Default to binmode when mode is not known. | ||||||
|  |  | ||||||
| 2002-05-29  Christopher Faylor  <cgf@redhat.com> | 2002-05-29  Christopher Faylor  <cgf@redhat.com> | ||||||
|  |  | ||||||
| 	* include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate. | 	* include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate. | ||||||
|   | |||||||
| @@ -434,7 +434,7 @@ fhandler_base::open (path_conv *pc, int flags, mode_t mode) | |||||||
|   else if (fmode & O_TEXT) |   else if (fmode & O_TEXT) | ||||||
|     bin = O_TEXT; |     bin = O_TEXT; | ||||||
|   else if (get_device () == FH_DISK) |   else if (get_device () == FH_DISK) | ||||||
|     bin = get_w_binary () || get_r_binary (); |     bin = get_w_binary () || get_r_binary () || O_BINARY; | ||||||
|   else |   else | ||||||
|     bin = (binmode == O_BINARY) || get_w_binary () || get_r_binary (); |     bin = (binmode == O_BINARY) || get_w_binary () || get_r_binary (); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -166,13 +166,13 @@ fhandler_disk_file::fstat (struct __stat64 *buf, path_conv *pc) | |||||||
| 	} | 	} | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   if (oret) |   if (!oret) | ||||||
|  |     res = fstat_by_name (buf, pc); | ||||||
|  |   else | ||||||
|     { |     { | ||||||
|       res = fstat_by_handle (buf, pc); |       res = fstat_by_handle (buf, pc); | ||||||
|       close (); |       close (); | ||||||
|     } |     } | ||||||
|   else if (pc->exists ()) |  | ||||||
|     res = fstat_by_name (buf, pc); |  | ||||||
|  |  | ||||||
|   return res; |   return res; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user