Commit 8bfecb84 by Bryce McKinlay Committed by Bryce McKinlay

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
parent f6fab919
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> 2000-04-12 Tom Tromey <tromey@cygnus.com>
* java/lang/natString.cc (intern): Temporarily disable finalizer * java/lang/natString.cc (intern): Temporarily disable finalizer
......
...@@ -83,7 +83,7 @@ java::io::FileDescriptor::open (jstring path, jint jflags) ...@@ -83,7 +83,7 @@ java::io::FileDescriptor::open (jstring path, jint jflags)
#endif #endif
JvAssert ((jflags & READ) || (jflags & WRITE)); JvAssert ((jflags & READ) || (jflags & WRITE));
int mode = 0644; int mode = 0666;
if ((jflags & READ) && (jflags & WRITE)) if ((jflags & READ) && (jflags & WRITE))
flags |= O_RDWR; flags |= O_RDWR;
else if ((jflags & READ)) else if ((jflags & READ))
...@@ -281,7 +281,7 @@ java::io::FileDescriptor::available (void) ...@@ -281,7 +281,7 @@ java::io::FileDescriptor::available (void)
if (! num_set) if (! num_set)
{ {
struct stat sb; struct stat sb;
off_t where; off_t where = 0;
if (fstat (fd, &sb) != -1 if (fstat (fd, &sb) != -1
&& S_ISREG (sb.st_mode) && S_ISREG (sb.st_mode)
&& (where = lseek (fd, SEEK_CUR, 0)) != (off_t) -1) && (where = lseek (fd, SEEK_CUR, 0)) != (off_t) -1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment