]> Creatis software - clitk.git/commitdiff
tmpnam_s for windows
authormpech <moi@.(none)>
Tue, 26 Jul 2011 14:14:14 +0000 (16:14 +0200)
committermpech <moi@.(none)>
Tue, 26 Jul 2011 14:14:14 +0000 (16:14 +0200)
tests/tools/toolTestRunner.cxx

index 89deab5a20614c20219e4a48db8184a0eefa5e4e..7237c686323869d285771c2bee2977ff31b2b99c 100644 (file)
@@ -35,11 +35,13 @@ int getOutputOptionIndex(int argc, char** argv){
 }
 
 std::string getTmpFileName(){
-  char fileName[] = "/tmp/vvTempXXXXXX";
+  
   
   #ifdef _WIN32
-    errno_t err = tmpfile_s(&fileName, strlen(fileName));
+       char fileName[L_tmpnam_s];
+    errno_t err = tmpnam_s(fileName);
   #else
+       char fileName[] = "/tmp/vvTempXXXXXX";
     int err=0;
     int fd = mkstemp(fileName);
     if(fd==-1) err=1;