libjava/java/io/natFileDescriptorPosix.cc -r1.25 -r1.26
Andreas Tobler
toa@pop.agri.ch
Fri May 16 04:03:00 GMT 2003
Loren James Rittle wrote:
> This patch:
>
> 2003-05-13 Michael Koch <konqueror@gmx.de>
>
> * java/io/FileDescriptor.java
> (SYNC): New constant.
> (DSYNC): Likewise.
> [...]
>
> broke bootstrap on *-*-freebsd[45]. FreeBSD 5 does support O_SYNC but
> not O_DSYNC. FreeBSD 4 supports neither.
>
> I would prefer the patch submitter to fix the problem in some manner.
> Otherwise, I'd ask whether I need to implement a simple guard around
> the use of these macros in java/io/natFileDescriptorPosix.cc, or
> whether we need to throw an implementation error when SYNC/DSYNC was
> requested at the "java layer" but there was no system support for it.
I have this one for darwin, it may also be valid for *BSD?
Not reg tested yet.
Andreas
RCS file: /cvs/gcc/gcc/libjava/include/posix.h,v
retrieving revision 1.18
diff -u -r1.18 posix.h
--- include/posix.h 22 Mar 2003 10:56:44 -0000 1.18
+++ include/posix.h 16 May 2003 04:01:56 -0000
@@ -48,6 +48,13 @@
#define _Jv_platform_solib_suffix ".so"
#endif
+// Darwin doesn't have O_SYNC and O_DYSNC so we define it here.
+// Needed in java/io/natFileDescriptorPosix.cc.
+#if defined(__APPLE__) && defined(__MACH__)
+#define O_SYNC O_FSYNC
+#define O_DSYNC O_FSYNC
+#endif
+
// Separator for file name components.
#define _Jv_platform_file_separator ((jchar) '/')
// Separator for path components.
More information about the Java-patches
mailing list