diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2000-04-16 03:09:27 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2000-04-16 04:09:27 +0100 |
commit | 8bfecb841aa979c01bc2dfd13fe31d6cef20d06c (patch) | |
tree | 1884a31b9965f6d805ba45f919d61cc9c4a3eae2 /libjava | |
parent | f6fab919bac96923ad3fb109368295021ab14751 (diff) | |
download | gcc-8bfecb841aa979c01bc2dfd13fe31d6cef20d06c.zip gcc-8bfecb841aa979c01bc2dfd13fe31d6cef20d06c.tar.gz gcc-8bfecb841aa979c01bc2dfd13fe31d6cef20d06c.tar.bz2 |
re GNATS java.io/202 (File creation doesn't observe umask)
2000-04-16 Bryce McKinlay <bryce@albatross.co.nz>
* java/io/natFileDescriptorPosix.cc (open): Use mode 0666. Fix for
PR libgcj/202.
(available): Initialize `Where' to prevent bogus compiler warning.
From-SVN: r33181
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/java/io/natFileDescriptorPosix.cc | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 742ccac..aafc886 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2000-04-16 Bryce McKinlay <bryce@albatross.co.nz> + + * java/io/natFileDescriptorPosix.cc (open): Use mode 0666. Fix for PR + libgcj/202. + (available): Initialize `where' to prevent bogus compiler warning. + 2000-04-12 Tom Tromey <tromey@cygnus.com> * java/lang/natString.cc (intern): Temporarily disable finalizer diff --git a/libjava/java/io/natFileDescriptorPosix.cc b/libjava/java/io/natFileDescriptorPosix.cc index ab95307..50be35c 100644 --- a/libjava/java/io/natFileDescriptorPosix.cc +++ b/libjava/java/io/natFileDescriptorPosix.cc @@ -83,7 +83,7 @@ java::io::FileDescriptor::open (jstring path, jint jflags) #endif JvAssert ((jflags & READ) || (jflags & WRITE)); - int mode = 0644; + int mode = 0666; if ((jflags & READ) && (jflags & WRITE)) flags |= O_RDWR; else if ((jflags & READ)) @@ -281,7 +281,7 @@ java::io::FileDescriptor::available (void) if (! num_set) { struct stat sb; - off_t where; + off_t where = 0; if (fstat (fd, &sb) != -1 && S_ISREG (sb.st_mode) && (where = lseek (fd, SEEK_CUR, 0)) != (off_t) -1) |