Salome HOME
Porting HOMARD SALOME module on WIN32 platform.
[modules/homard.git] / src / HOMARD_I / HOMARD_Cas_i.cxx
index 0ba88c2b86ef302989eb38087f4aeca55446f1bd..6515972fa5b1fd3edffea1f7b16461aa5484c704 100755 (executable)
 #include <vector>
 #include <sys/stat.h>
 
+#ifdef WIN32
+#include <direct.h>
+#endif
+
 //=============================================================================
 /*!
  *  standard constructor
@@ -161,7 +165,11 @@ void HOMARD_Cas_i::SetDirName( const char* NomDir )
     // D.3. Creation du futur repertoire local pour l'iteration de depart
     std::string nomDirIterTotal ;
     nomDirIterTotal = std::string(NomDir) + "/" + std::string(nomDirIter) ;
+#ifndef WIN32
     if (mkdir(nomDirIterTotal.c_str(), S_IRWXU|S_IRGRP|S_IXGRP) != 0)
+#else
+    if (_mkdir(nomDirIterTotal.c_str()) != 0)
+#endif
     {
       MESSAGE ( "nomDirIterTotal : " << nomDirIterTotal ) ;
       SALOME::ExceptionStruct es;