summaryrefslogtreecommitdiffstats
path: root/libjava
diff options
context:
space:
mode:
authorljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-05 22:37:02 +0000
committerljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-05 22:37:02 +0000
commit14ba6a985c96dcd8e28088b541a5e800a3a97135 (patch)
treebe358b187ff70984c90220e3fda331404115f67c /libjava
parentfaba45456061680b179e13b2c4cb356dc7d65ef8 (diff)
downloadppe42-gcc-14ba6a985c96dcd8e28088b541a5e800a3a97135.tar.gz
ppe42-gcc-14ba6a985c96dcd8e28088b541a5e800a3a97135.zip
* libjava/include/posix.h (O_SYNC): Define if not available
and a reasonable, perhaps more conservative, replacement exists. (O_DSYNC): Likewise. * java/io/natFileDescriptorPosix.cc (open): Revert last patch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67517 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog7
-rw-r--r--libjava/include/posix.h9
-rw-r--r--libjava/java/io/natFileDescriptorPosix.cc2
3 files changed, 16 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 7c1c20d71fc..c59eb757b31 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,10 @@
+2002-06-05 Loren J. Rittle <ljrittle@acm.org>
+
+ * libjava/include/posix.h (O_SYNC): Define if not available
+ and a reasonable, perhaps more conservative, replacement exists.
+ (O_DSYNC): Likewise.
+ * java/io/natFileDescriptorPosix.cc (open): Revert last patch.
+
2003-06-05 Michael Koch <konqueror@gmx.de>
* javax/swing/plaf/BorderUIResource.java,
diff --git a/libjava/include/posix.h b/libjava/include/posix.h
index ad937536a8e..100333c2331 100644
--- a/libjava/include/posix.h
+++ b/libjava/include/posix.h
@@ -48,6 +48,15 @@ details. */
#define _Jv_platform_solib_suffix ".so"
#endif
+// Some POSIX systems don't have O_SYNC and O_DYSNC so we define them here.
+// Needed in java/io/natFileDescriptorPosix.cc.
+#if !defined (O_SYNC) && defined (O_FSYNC)
+#define O_SYNC O_FSYNC
+#endif
+#if !defined (O_DSYNC) && defined (O_FSYNC)
+#define O_DSYNC O_FSYNC
+#endif
+
// Separator for file name components.
#define _Jv_platform_file_separator ((jchar) '/')
// Separator for path components.
diff --git a/libjava/java/io/natFileDescriptorPosix.cc b/libjava/java/io/natFileDescriptorPosix.cc
index b8892af6059..2ad2d9dce77 100644
--- a/libjava/java/io/natFileDescriptorPosix.cc
+++ b/libjava/java/io/natFileDescriptorPosix.cc
@@ -105,13 +105,11 @@ java::io::FileDescriptor::open (jstring path, jint jflags)
}
}
-/* FIXME: comment this out until its better tested/implemented
if ((jflags & SYNC))
flags |= O_SYNC;
if ((jflags & DSYNC))
flags |= O_DSYNC;
-*/
int fd = ::open (buf, flags, mode);
if (fd == -1 && errno == EMFILE)
OpenPOWER on IntegriCloud