Subject: Re: file synchronization fixes

From: Eli Zaretskii <[email-masked]>
Date: Wed, 13 Mar 2013 20:02:57 +0200

> Date: Wed, 13 Mar 2013 00:38:00 -0700
> From: Paul Eggert <[email-masked]>
> CC: Eli Zaretskii <[email-masked]>
> 
> Attached a patch which I'd like to install.  If MS-Windows has fdatasync
> already this should build on MS-Windows; if not, the MS-Windows port
> needs to compile lib/fdatasync.c or support an fdatasync substitute
> in some other way.

I think all that is needed for the MS-Windows build is this one line:

--- nt/inc/ms-w32.h	2013-02-25 17:36:03 +0000
+++ nt/inc/ms-w32.h	2013-03-13 17:57:30 +0000
@@ -225,6 +225,7 @@ extern int sys_unlink (const char *);
 #define fileno	  _fileno
 #endif
 #define fsync	  _commit
+#define fdatasync _commit
 #define ftruncate _chsize
 #define getpid    _getpid
 #ifdef _MSC_VER

Thanks.