|
|
@ -1118,9 +1118,13 @@ void FileCommit(FILE *fileout) |
|
|
|
fflush(fileout); // harmless if redundantly called
|
|
|
|
fflush(fileout); // harmless if redundantly called
|
|
|
|
#ifdef WIN32 |
|
|
|
#ifdef WIN32 |
|
|
|
_commit(_fileno(fileout)); |
|
|
|
_commit(_fileno(fileout)); |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
#if defined(__linux__) || defined(__NetBSD__) |
|
|
|
|
|
|
|
fdatasync(fileno(fileout)); |
|
|
|
#else |
|
|
|
#else |
|
|
|
fsync(fileno(fileout)); |
|
|
|
fsync(fileno(fileout)); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int GetFilesize(FILE* file) |
|
|
|
int GetFilesize(FILE* file) |
|
|
|