diff options
author | megacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-10 03:34:27 +0000 |
---|---|---|
committer | megacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-10 03:34:27 +0000 |
commit | 80b58a84f7924a94d1d40c0b96a76090a0dd8b6d (patch) | |
tree | 896dea98e93a5700e57d81616fa0d59faa56fb51 | |
parent | 4e0dde968cb4eb15f3bd1d84e752b9be057edba5 (diff) | |
download | gcc-80b58a84f7924a94d1d40c0b96a76090a0dd8b6d.tar.gz |
2002-03-09 Adam Megacz <adam@xwt.org>
* 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
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/io/natFileDescriptorWin32.cc | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index ad2364093c5..6df3cfaa891 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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. diff --git a/libjava/java/io/natFileDescriptorWin32.cc b/libjava/java/io/natFileDescriptorWin32.cc index 4a9d690bf2c..694272a67bd 100644 --- a/libjava/java/io/natFileDescriptorWin32.cc +++ b/libjava/java/io/natFileDescriptorWin32.cc @@ -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; } |