summaryrefslogtreecommitdiff
path: root/java/jc/files/patch-aa
blob: 3e29b913d7a43c5c983ae24cfeb2f1d17e70be92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- classpath-0.07/native/target/generic/target_generic_file.h	2003/11/02 15:51:19	1.11
+++ classpath-0.07/native/target/generic/target_generic_file.h	2004/01/27 20:47:54	1.13
@@ -58,6 +58,7 @@
 
 #include <stdlib.h>
 #include <assert.h>
+#include <fcntl.h>
 
 #include "target_native.h"
 #include "target_native_math_int.h"
@@ -90,7 +91,11 @@
   #define TARGET_NATIVE_FILE_FILEFLAG_APPEND O_APPEND
 #endif
 #ifndef TARGET_NATIVE_FILE_FILEFLAG_SYNC
-  #define TARGET_NATIVE_FILE_FILEFLAG_SYNC O_SYNC
+  #if !defined (O_SYNC) && defined (O_FSYNC)
+    #define TARGET_NATIVE_FILE_FILEFLAG_SYNC O_FSYNC
+  #else
+    #define TARGET_NATIVE_FILE_FILEFLAG_SYNC O_SYNC
+  #endif
 #endif
 #ifndef TARGET_NATIVE_FILE_FILEFLAG_DSYNC
   #ifdef O_DSYNC