Jelajahi Sumber

libraster: +comment for alternative to fsync on MS Windows

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74467 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 6 tahun lalu
induk
melakukan
8935ab8e20
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      lib/raster/close.c

+ 3 - 0
lib/raster/close.c

@@ -56,6 +56,9 @@ static void sync_and_close(int fd, char *element, char *name)
 	G_warning(_("Unable to flush file %s for raster map %s: %s"),
 	            element, name, strerror(errno));
     }
+    /* for MS Windows, try fdopen(int, char *) + fflush(FILE *) + fclose(FILE *)
+     * flcose() closes the underlying file descriptor, thus no need to 
+     * call close(fd) afterwards */
 #endif
     if (close(fd)) {
 	G_warning(_("Unable to close file %s for raster map %s: %s"),