Salome HOME
Fix compilation error.
authorrnv <rnv@opencascade.com>
Wed, 1 Jul 2020 11:06:55 +0000 (14:06 +0300)
committerrnv <rnv@opencascade.com>
Wed, 1 Jul 2020 11:06:55 +0000 (14:06 +0300)
src/engine/Test/engineTest.cxx

index 5c2a7bee2749390a24e4a788a1314f0e4637061c..7699854e26db5f2ab72e7f68e42a3f6421070dcf 100644 (file)
 #include <list>
 #include <vector>
 #include <string.h>
+#ifdef WIN32
+#include <stdlib.h>
+#else
 #include <unistd.h>
+#endif
 
 //#define _DEVDEBUG_
 #include "YacsTrace.hxx"
@@ -1001,10 +1005,16 @@ void EngineTest::RecursiveBlocs_multipleRecursion()
         DEBTRACE("     output port name for graphe = " << _nodeMap["graphe"]->getOutPortName(*it));
       }
     YACS::ENGINE::VisitorSaveState vst(_compoMap["graphe"]);
+#ifdef WIN32
+      std::string logDir=getenv("SALOME_TMP_DIR");
+      logDir += "\\";
+#else
     std::string logDir = std::string("/tmp/")+ getlogin();
     std::string cmd = "mkdir -p " + logDir;
     system( cmd.c_str() );
-    vst.openFileDump(logDir + std::string("/RecursiveBlocs_multipleRecursion_dumpState.xml"));
+       logDir += "/";
+#endif
+    vst.openFileDump(logDir + std::string("RecursiveBlocs_multipleRecursion_dumpState.xml"));
     _compoMap["graphe"]->accept(&vst);
     vst.closeFileDump();
   }