mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user