OSDN Git Service

2002-03-09 Adam Megacz <adam@xwt.org>
authormegacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 10 Mar 2002 03:34:27 +0000 (03:34 +0000)
committermegacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 10 Mar 2002 03:34:27 +0000 (03:34 +0000)
        * java/io/natFileDescriptorWin32.cc (read): Return -1 if zero
        bytes read and no failure code returned.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50519 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/java/io/natFileDescriptorWin32.cc

index ad23640..6df3cfa 100644 (file)
@@ -1,5 +1,10 @@
 2002-03-09  Adam Megacz  <adam@xwt.org>
 
+        * java/io/natFileDescriptorWin32.cc (read): Return -1 if zero
+        bytes read and no failure code returned.
+
+2002-03-09  Adam Megacz  <adam@xwt.org>
+
         * win32.cc (_CRT_MT, __mingwthr_key_dtor) Added fake
         definitions to simulate -mthreads.
        
index 4a9d690..694272a 100644 (file)
@@ -255,6 +255,7 @@ java::io::FileDescriptor::read(jbyteArray buffer, jint offset, jint count)
   if (! ReadFile((HANDLE)fd, bytes, count, &read, NULL))
     throw new IOException (JvNewStringLatin1 (winerr ()));
 
+  if (read == 0) return -1;
   return (jint)read;
 }