Просмотр исходного кода

libraster: no fsync check for corrupt raster data on windows

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74466 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 6 лет назад
Родитель
Сommit
8a356eb9f9
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      lib/raster/close.c

+ 2 - 0
lib/raster/close.c

@@ -51,10 +51,12 @@ static void sync_and_close(int fd, char *element, char *name)
      * after you are done writing all your data.
      * after you are done writing all your data.
      */
      */
 
 
+#ifndef __MINGW32__
     if (fsync(fd)) {
     if (fsync(fd)) {
 	G_warning(_("Unable to flush file %s for raster map %s: %s"),
 	G_warning(_("Unable to flush file %s for raster map %s: %s"),
 	            element, name, strerror(errno));
 	            element, name, strerror(errno));
     }
     }
+#endif
     if (close(fd)) {
     if (close(fd)) {
 	G_warning(_("Unable to close file %s for raster map %s: %s"),
 	G_warning(_("Unable to close file %s for raster map %s: %s"),
 	            element, name, strerror(errno));
 	            element, name, strerror(errno));