diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-29 18:05:15 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-29 18:05:15 +0000 |
commit | fdce0b6449f62f3e243e59aa2f5453ed1e61138c (patch) | |
tree | a31a718cf9037c5c8f783d5e793792805d6ed4b0 /libjava/java | |
parent | 3196bed74979360646cbc8418db5c86c0527ced4 (diff) | |
download | ppe42-gcc-fdce0b6449f62f3e243e59aa2f5453ed1e61138c.tar.gz ppe42-gcc-fdce0b6449f62f3e243e59aa2f5453ed1e61138c.zip |
* java/io/natFileDescriptorPosix.cc (setLength): Handle case where
ftruncate is missing.
* configure, include/config.h.in: Rebuilt.
* acconfig.h (HAVE_FTRUNCATE): Mention.
* configure.in: Check for ftruncate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56658 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/io/natFileDescriptorPosix.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libjava/java/io/natFileDescriptorPosix.cc b/libjava/java/io/natFileDescriptorPosix.cc index 9f4c7c3cb1d..9929c3021f7 100644 --- a/libjava/java/io/natFileDescriptorPosix.cc +++ b/libjava/java/io/natFileDescriptorPosix.cc @@ -195,6 +195,7 @@ java::io::FileDescriptor::setLength (jlong pos) struct stat sb; off_t orig; +#ifdef HAVE_FTRUNCATE if (::fstat (fd, &sb)) throw new IOException (JvNewStringLatin1 (strerror (errno))); @@ -219,6 +220,9 @@ java::io::FileDescriptor::setLength (jlong pos) } else if (::ftruncate (fd, (off_t) pos)) throw new IOException (JvNewStringLatin1 (strerror (errno))); +#else /* HAVE_FTRUNCATE */ + throw new IOException (JvNewStringLatin1 ("FileDescriptor.setLength not implemented")); +#endif /* HAVE_FTRUNCATE */ } jint |