From: rnv Date: Fri, 30 Mar 2012 07:09:53 +0000 (+0000) Subject: Fix compilation error on Win32 platform. X-Git-Tag: V1_5_0b1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8ff6c6dfe56422e4be5f08b325a5572cdfeb1770;p=tools%2Flibbatch.git Fix compilation error on Win32 platform. --- diff --git a/src/Core/Batch_CommunicationProtocol.cxx b/src/Core/Batch_CommunicationProtocol.cxx index 032603f..82f5b4f 100644 --- a/src/Core/Batch_CommunicationProtocol.cxx +++ b/src/Core/Batch_CommunicationProtocol.cxx @@ -33,9 +33,15 @@ #include #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" diff --git a/src/Vishnu/Batch_BatchManager_eVishnu.cxx b/src/Vishnu/Batch_BatchManager_eVishnu.cxx index 7ac2ee5..df14196 100644 --- a/src/Vishnu/Batch_BatchManager_eVishnu.cxx +++ b/src/Vishnu/Batch_BatchManager_eVishnu.cxx @@ -31,6 +31,10 @@ #include #include +#ifdef WIN32 +#include +#endif + #include #include #include @@ -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;