]> granicus.if.org Git - postgresql/commitdiff
Add fsync() define for Win32 to cover cases other than wal_sync_method
authorBruce Momjian <bruce@momjian.us>
Thu, 16 Jun 2005 17:53:54 +0000 (17:53 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 16 Jun 2005 17:53:54 +0000 (17:53 +0000)
where we need fsync().

src/include/port/win32.h

index c551b78ebdfe0bee531a623a27b76cbc8a5236eb..1617bc104dabee839ce5cfad0ba233e87badafa1 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.45 2005/05/20 14:53:26 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.46 2005/06/16 17:53:54 momjian Exp $ */
 
 /* undefine and redefine after #include */
 #undef mkdir
 #define HAVE_FSYNC_WRITETHROUGH
 #define HAVE_FSYNC_WRITETHROUGH_ONLY
 #define ftruncate(a,b) chsize(a,b)
+/*
+ *     Even though we don't support 'fsync' as a wal_sync_method,
+ *     we do fsync() a few other places where _commit() is just fine.
+ */
+#define fsync(fd) _commit(fd)
 
 #define USES_WINSOCK