]> SALOME platform Git repositories - tools/libbatch.git/commitdiff
Salome HOME
Fix compilation error on Win32 platform.
authorrnv <rnv@opencascade.com>
Fri, 30 Mar 2012 07:09:53 +0000 (07:09 +0000)
committerrnv <rnv@opencascade.com>
Fri, 30 Mar 2012 07:09:53 +0000 (07:09 +0000)
src/Core/Batch_CommunicationProtocol.cxx
src/Vishnu/Batch_BatchManager_eVishnu.cxx

index 032603f206f624e8a7e8ee545fe4fb5084dec684..82f5b4f566bc74188a78e4b0fbdeda7962715a10 100644 (file)
 #include <Batch_config.h>
 
 #include "Batch_CommunicationProtocol.hxx"
-#include "Batch_CommunicationProtocolRSH.hxx"
-#include "Batch_CommunicationProtocolSH.hxx"
-#include "Batch_CommunicationProtocolSSH.hxx"
+#ifdef HAS_RSH
+ #include "Batch_CommunicationProtocolRSH.hxx"
+#endif
+#ifdef HAS_SH
+ #include "Batch_CommunicationProtocolSH.hxx"
+#endif
+#ifdef HAS_SSH
+ #include "Batch_CommunicationProtocolSSH.hxx"
+#endif
 #include "Batch_APIInternalFailureException.hxx"
 #include "Batch_RunTimeException.hxx"
 
index 7ac2ee57c1ceb9bc5323667c229abc285f85f534..df14196ec556505c32f0c123db73780093aa6211 100644 (file)
 #include <fstream>
 #include <sstream>
 
+#ifdef WIN32
+#include <direct.h>
+#endif
+
 #include <Batch_NotYetImplementedException.hxx>
 #include <Batch_Constants.hxx>
 #include <Batch_Utils.hxx>
@@ -163,7 +167,12 @@ namespace Batch {
       Couple inputFile = cpt;
 
       // Get absolute paths
-      char * buf = getcwd(NULL, 0);
+      char * buf = 
+#ifdef WIN32
+      _getcwd(NULL, 0);
+#else
+       getcwd(NULL, 0);
+#endif
       string cwd = buf;
       free(buf);
 
@@ -341,7 +350,12 @@ namespace Batch {
     Versatile::const_iterator Vit;
 
     // Create local result directory
-    char * buf = getcwd(NULL, 0);
+    char * buf = 
+#ifdef WIN32
+     _getcwd(NULL, 0);
+#else
+     getcwd(NULL, 0);
+#endif
     string cwd = buf;
     free(buf);
     string absdir = (Utils::isAbsolutePath(directory))? directory : cwd + "/" + directory;