Patch: fix for PR libgcj/2338
Tom Tromey
tromey@redhat.com
Wed Mar 21 09:20:00 GMT 2001
I'm checking this in on the trunk and the branch.
2001-03-21 Tom Tromey <tromey@redhat.com>
* java/io/natFileDescriptorPosix.cc (open): Add O_CREAT in
read/write case. Fixes PR libgcj/2338.
Tom
Index: java/io/natFileDescriptorPosix.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/natFileDescriptorPosix.cc,v
retrieving revision 1.10
diff -u -r1.10 natFileDescriptorPosix.cc
--- natFileDescriptorPosix.cc 2000/08/02 21:54:04 1.10
+++ natFileDescriptorPosix.cc 2001/03/21 17:18:25
@@ -1,6 +1,6 @@
// natFileDescriptor.cc - Native part of FileDescriptor class.
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
This file is part of libgcj.
@@ -81,7 +81,7 @@
JvAssert ((jflags & READ) || (jflags & WRITE));
int mode = 0666;
if ((jflags & READ) && (jflags & WRITE))
- flags |= O_RDWR;
+ flags |= O_RDWR | O_CREAT;
else if ((jflags & READ))
flags |= O_RDONLY;
else
More information about the Java-patches
mailing list