Merge pull request #1879 from sipa/fdatasync

Use fdatasync instead of fsync on supported platforms
pull/1921/head
Wladimir J. van der Laan 12 years ago
commit 16f3618c13

@ -1119,7 +1119,11 @@ void FileCommit(FILE *fileout)
#ifdef WIN32 #ifdef WIN32
_commit(_fileno(fileout)); _commit(_fileno(fileout));
#else #else
#if defined(__linux__) || defined(__NetBSD__)
fdatasync(fileno(fileout));
#else
fsync(fileno(fileout)); fsync(fileno(fileout));
#endif
#endif #endif
} }

Loading…
Cancel
Save