summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-09 22:50:02 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-09 22:50:02 +0000
commitecf2e70b5e71c05efcbf029488bbf5694051a948 (patch)
tree49af5800f39c40dab0fae23d38ed2de67103832a
parentdeea81ea42ff6aa8ab7c4c9f830a31f506de59ac (diff)
downloadgcc-ecf2e70b5e71c05efcbf029488bbf5694051a948.tar.gz
PR libgcj/9934:
* java/io/natFileDescriptorPosix.cc (available): Fixed arguments to lseek. Return 0 if we can't compute the value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64053 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/java/io/natFileDescriptorPosix.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 5dd727379b2..8689e79a3d4 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-09 Tom Tromey <tromey@redhat.com>
+
+ PR libgcj/9934:
+ * java/io/natFileDescriptorPosix.cc (available): Fixed arguments
+ to lseek. Return 0 if we can't compute the value.
+
2003-03-03 Michael Koch <konqueror@gmx.de>
* java/net/NetworkInterface.java: Merged with classpath.
diff --git a/libjava/java/io/natFileDescriptorPosix.cc b/libjava/java/io/natFileDescriptorPosix.cc
index e8ec9a7e733..ad1dcc49c32 100644
--- a/libjava/java/io/natFileDescriptorPosix.cc
+++ b/libjava/java/io/natFileDescriptorPosix.cc
@@ -371,7 +371,7 @@ java::io::FileDescriptor::available (void)
off_t where = 0;
if (fstat (fd, &sb) != -1
&& S_ISREG (sb.st_mode)
- && (where = lseek (fd, SEEK_CUR, 0)) != (off_t) -1)
+ && (where = lseek (fd, 0, SEEK_CUR)) != (off_t) -1)
{
num = (long) (sb.st_size - where);
num_set = true;
@@ -397,6 +397,6 @@ java::io::FileDescriptor::available (void)
return (jint) num;
#else
- throw new IOException (JvNewStringLatin1 ("unimplemented"));
+ return 0;
#endif
}