[kaffe] CVS kaffe (stack): Fix a compile error on FreeBSD

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Sat Aug 30 13:45:03 2003


PatchSet 3999 
Date: 2003/08/30 20:24:58
Author: stack
Branch: HEAD
Tag: (none) 
Log:
Fix a compile error on FreeBSD

Members: 
	ChangeLog:1.1595->1.1596 
	libraries/clib/io/FileDescriptor.c:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1595 kaffe/ChangeLog:1.1596
--- kaffe/ChangeLog:1.1595	Sat Aug 30 20:12:03 2003
+++ kaffe/ChangeLog	Sat Aug 30 20:24:58 2003
@@ -1,3 +1,9 @@
+2003-08-30  Timothy S. Stack <stack@cs.utah.edu>
+
+	* libraries/clib/io/FileDescriptor.c:
+	Use '#ifdef's around O_SYNC/O_DSYNC since they are not defined on
+	FreeBSD.
+
 2003-08-30  Guilhem Lavaux <guilhem@kaffe.org>
 
 	* libraries/javalib/rebuildLib.in: Check if SRCDIR represents an
Index: kaffe/libraries/clib/io/FileDescriptor.c
diff -u kaffe/libraries/clib/io/FileDescriptor.c:1.4 kaffe/libraries/clib/io/FileDescriptor.c:1.5
--- kaffe/libraries/clib/io/FileDescriptor.c:1.4	Sat Aug 30 14:18:24 2003
+++ kaffe/libraries/clib/io/FileDescriptor.c	Sat Aug 30 20:24:59 2003
@@ -84,11 +84,15 @@
     else
       open_options |= O_TRUNC;
   }
-  
+
+#if defined(O_SYNC)
   if (mode & JAVA_SYNC)
     open_options |= O_SYNC;
+#endif
+#if defined(O_DSYNC)
   if (mode & JAVA_DSYNC)
     open_options |= O_DSYNC;
+#endif
 
   // By default we put the files in all rw access. It will be modified by process umask.
   rc = KOPEN(str, open_options|O_BINARY, 0666, &fd);