Index: java/io/natFileDescriptorWin32.cc =================================================================== RCS file: /cvsroot/gcc/gcc/libjava/java/io/natFileDescriptorWin32.cc,v retrieving revision 1.12 diff -u -2 -r1.12 natFileDescriptorWin32.cc --- java/io/natFileDescriptorWin32.cc 11 Feb 2003 20:55:26 -0000 1.12 +++ java/io/natFileDescriptorWin32.cc 11 May 2003 18:04:39 -0000 @@ -72,6 +72,11 @@ jboolean java::io::FileDescriptor::valid (void) { - BY_HANDLE_FILE_INFORMATION info; - return GetFileInformationByHandle ((HANDLE)fd, &info) != 0; + /* As with UNIX, a "file" descriptor can be one of + a gazillion possible underlying things like a pipe + or socket, so we can't get too fancy here. */ + DWORD dwFlags; + HANDLE h = (HANDLE) fd; + return !!GetHandleInformation (h, &dwFlags); + // FIXME: this will only work for WinNT > 5.0 }