[GRASS-SVN] r38217 - grass/branches/develbranch_6/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:45 -0400 (Sun, 05 Jul 2009)
New Revision: 38217

Modified:
   grass/branches/develbranch_6/lib/iostream/ami_stream.cc
Log:
report correct error on Windows

Modified: grass/branches/develbranch_6/lib/iostream/ami_stream.cc
===================================================================
--- grass/branches/develbranch_6/lib/iostream/ami_stream.cc	2009-07-05 08:29:41 UTC (rev 38216)
+++ grass/branches/develbranch_6/lib/iostream/ami_stream.cc	2009-07-05 08:29:45 UTC (rev 38217)
@@ -66,12 +66,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