changeset 588:638e1647b199

Use _commit() to emulate fsync() fsync() itself is used to emulate fdatasync(). Round and round we go.
author mas01cr
date Tue, 11 Aug 2009 21:42:07 +0000
parents 08811763ccfa
children 9119f2fa3efe
files audioDB-internals.h
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB-internals.h	Tue Aug 11 21:42:01 2009 +0000
+++ b/audioDB-internals.h	Tue Aug 11 21:42:07 2009 +0000
@@ -182,7 +182,9 @@
     goto error;
   }
 
-#if defined(_POSIX_SYNCHRONIZED_IO) && (_POSIX_SYNCHRONIZED_IO > 0)
+#if defined(WIN32)
+  _commit(adb->fd);
+#elif defined(_POSIX_SYNCHRONIZED_IO) && (_POSIX_SYNCHRONIZED_IO > 0)
   fdatasync(adb->fd);
 #else
   fsync(adb->fd);