[GRASS-SVN] r69224 - grass/branches/releasebranch_7_2/lib/raster
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 23 02:26:05 PDT 2016
Author: martinl
Date: 2016-08-23 02:26:04 -0700 (Tue, 23 Aug 2016)
New Revision: 69224
Modified:
grass/branches/releasebranch_7_2/lib/raster/open.c
Log:
G__tempfile() lacks perror support (see #2278, backport r69223 from trunk)
Modified: grass/branches/releasebranch_7_2/lib/raster/open.c
===================================================================
--- grass/branches/releasebranch_7_2/lib/raster/open.c 2016-08-23 09:24:53 UTC (rev 69223)
+++ grass/branches/releasebranch_7_2/lib/raster/open.c 2016-08-23 09:26:04 UTC (rev 69224)
@@ -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