Procházet zdrojové kódy

report correct error on Windows

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38216 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler před 16 roky
rodič
revize
536712efea
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      lib/iostream/ami_stream.cc

+ 5 - 1
lib/iostream/ami_stream.cc

@@ -84,12 +84,16 @@ ami_single_temp_name(const std::string& base, char* tmp_path) {
 #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);
   }