mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 04:26:48 +08:00
natFileDescriptorWin32.cc (read): Return -1 if zero bytes read and no failure code returned.
2002-03-09 Adam Megacz <adam@xwt.org> * java/io/natFileDescriptorWin32.cc (read): Return -1 if zero bytes read and no failure code returned. From-SVN: r50519
This commit is contained in:
parent
aa7543832a
commit
828c1ddccc
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user