Commit 49c72d22 by Loren J. Rittle Committed by Loren J. Rittle

posix.h (O_SYNC): Define if not available and a reasonable...

	* 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.

From-SVN: r67517
parent 23c84d33
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> 2003-06-05 Michael Koch <konqueror@gmx.de>
* javax/swing/plaf/BorderUIResource.java, * javax/swing/plaf/BorderUIResource.java,
......
...@@ -48,6 +48,15 @@ details. */ ...@@ -48,6 +48,15 @@ details. */
#define _Jv_platform_solib_suffix ".so" #define _Jv_platform_solib_suffix ".so"
#endif #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. // Separator for file name components.
#define _Jv_platform_file_separator ((jchar) '/') #define _Jv_platform_file_separator ((jchar) '/')
// Separator for path components. // Separator for path components.
......
...@@ -105,13 +105,11 @@ java::io::FileDescriptor::open (jstring path, jint jflags) ...@@ -105,13 +105,11 @@ java::io::FileDescriptor::open (jstring path, jint jflags)
} }
} }
/* FIXME: comment this out until its better tested/implemented
if ((jflags & SYNC)) if ((jflags & SYNC))
flags |= O_SYNC; flags |= O_SYNC;
if ((jflags & DSYNC)) if ((jflags & DSYNC))
flags |= O_DSYNC; flags |= O_DSYNC;
*/
int fd = ::open (buf, flags, mode); int fd = ::open (buf, flags, mode);
if (fd == -1 && errno == EMFILE) if (fd == -1 && errno == EMFILE)
......
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