[GRASS-SVN] r69223 - grass/trunk/lib/raster
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 23 02:24:53 PDT 2016
Author: martinl
Date: 2016-08-23 02:24:53 -0700 (Tue, 23 Aug 2016)
New Revision: 69223
Modified:
grass/trunk/lib/raster/open.c
Log:
G__tempfile() lacks perror support (see #2278)
Modified: grass/trunk/lib/raster/open.c
===================================================================
--- grass/trunk/lib/raster/open.c 2016-08-23 07:38:07 UTC (rev 69222)
+++ grass/trunk/lib/raster/open.c 2016-08-23 09:24:53 UTC (rev 69223)
@@ -619,10 +619,11 @@
tempname = G_tempfile();
cell_fd = creat(tempname, 0666);
if (cell_fd < 0) {
+ int err = errno;
G_free(mapset);
G_free(tempname);
G_free(map);
- G_fatal_error(_("No temp files available: %s"), strerror(errno));
+ G_fatal_error(_("No temp files available: %s"), strerror(err));
}
fd = new_fileinfo();
@@ -696,12 +697,13 @@
tempname = G_tempfile();
fcb->null_fd = creat(tempname, 0666);
if (fcb->null_fd < 0) {
+ int err = errno;
G_free(tempname);
G_free(fcb->name);
G_free(fcb->mapset);
G_free(fcb->temp_name);
close(cell_fd);
- G_fatal_error(_("No temp files available: %s"), strerror(errno));
+ G_fatal_error(_("No temp files available: %s"), strerror(err));
}
fcb->null_temp_name = tempname;
@@ -772,10 +774,11 @@
tempname = G_tempfile();
fcb->null_fd = creat(tempname, 0666);
if (fcb->null_fd < 0) {
+ int err = errno;
G_free(tempname);
G_free(fcb->name);
G_free(fcb->mapset);
- G_fatal_error(_("No temp files available: %s"), strerror(errno));
+ G_fatal_error(_("No temp files available: %s"), strerror(err));
}
fcb->null_temp_name = tempname;
More information about the grass-commit
mailing list