From: Tom Tromey Date: Wed, 21 Mar 2001 17:23:09 +0000 (+0000) Subject: re PR libgcj/2338 (RandomAccessFile does not create the file if not found) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5db60c46d06cdb6276d257d9ea895a4facb3e718;p=gcc.git re PR libgcj/2338 (RandomAccessFile does not create the file if not found) * java/io/natFileDescriptorPosix.cc (open): Add O_CREAT in read/write case. Fixes PR libgcj/2338. From-SVN: r40692 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 817f677a04d..c3639bd79c9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2001-03-21 Tom Tromey + + * java/io/natFileDescriptorPosix.cc (open): Add O_CREAT in + read/write case. Fixes PR libgcj/2338. + 2001-03-20 Warren Levy * java/util/TimeZone.java: Sync up with Classpath. Includes new diff --git a/libjava/java/io/natFileDescriptorPosix.cc b/libjava/java/io/natFileDescriptorPosix.cc index 059eeb96564..0b80c6435c2 100644 --- a/libjava/java/io/natFileDescriptorPosix.cc +++ b/libjava/java/io/natFileDescriptorPosix.cc @@ -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 @@ java::io::FileDescriptor::open (jstring path, jint jflags) 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