[GRASS-SVN] r38216 - grass/trunk/lib/iostream
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jul 5 04:29:47 EDT 2009
Author: neteler
Date: 2009-07-05 04:29:41 -0400 (Sun, 05 Jul 2009)
New Revision: 38216
Modified:
grass/trunk/lib/iostream/ami_stream.cc
Log:
report correct error on Windows
Modified: grass/trunk/lib/iostream/ami_stream.cc
===================================================================
--- grass/trunk/lib/iostream/ami_stream.cc 2009-07-04 20:33:05 UTC (rev 38215)
+++ grass/trunk/lib/iostream/ami_stream.cc 2009-07-05 08:29:41 UTC (rev 38216)
@@ -84,12 +84,16 @@
#ifdef __MINGW32__
fd = mktemp(tmp_path) ? open(tmp_path, O_CREAT|O_EXCL|O_RDWR, 0600) : -1;
#else
- fd = mkstemp(tmp_path);
+ fd = mkstemp(tmp_path);
#endif
if (fd == -1) {
cerr << "ami_single_temp_name: ";
+#ifdef __MINGW32__
+ perror("mktemp failed: ");
+#else
perror("mkstemp failed: ");
+#endif
assert(0);
exit(1);
}
More information about the grass-commit
mailing list