Coda File System

Patch: FreeBSD support for rvm 1.7

From: Tim Robbins <tjr_at_FreeBSD.ORG>
Date: Fri, 7 Mar 2003 16:37:03 +1100
It's not safe to assume that fdatasync() is supported because
_POSIX_SYNCHRONIZED_IO is defined. FreeBSD 5.0 defines _POSIX_SYNCHRONIZED_IO
as -1, which means that the feature is not implemented.

Note: version numbers in the diff output do not correspond to those
in the Coda CVS repository. This patch is against rvm 1.7.


Index: rvm/rvm_io.c
===================================================================
RCS file: /home/tim/coda/repo/rvm/rvm/rvm_io.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -r1.1.1.1 -r1.3
--- rvm/rvm_io.c	7 Mar 2003 04:05:51 -0000	1.1.1.1
+++ rvm/rvm_io.c	7 Mar 2003 05:13:42 -0000	1.3
@@ -37,7 +37,7 @@
 #define UIO_MAXIOV 16
 #endif
 
-#ifdef _POSIX_SYNCHRONIZED_IO
+#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO != -1
 #define FSYNC(fd) fdatasync(fd)
 #else
 #define FSYNC(fd) fsync(fd)
Received on 2003-03-07 00:38:00