Explorar o código

Merge pull request #7894 from xwang2713/HPCC_14428

HPCC-14428 Replace popen/pclose with _popen/_pclose on Windows

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman %!s(int64=9) %!d(string=hai) anos
pai
achega
a441a8a9fb

+ 1 - 1
esp/services/ws_machine/componentstatus.cpp

@@ -331,7 +331,7 @@ static CComponentStatusFactory *csFactory = NULL;
 
 static CriticalSection getComponentStatusSect;
 
-extern COMPONENTSTATUS_API IComponentStatusFactory* getComponentStatusFactory()
+IComponentStatusFactory* getComponentStatusFactory()
 {
     CriticalBlock block(getComponentStatusSect);
 

+ 1 - 1
esp/services/ws_machine/componentstatus.hpp

@@ -104,4 +104,4 @@ public:
     virtual void updateComponentStatus(const char* reporter, IArrayOf<IConstComponentStatus>& statusList);
 };
 
-extern "C" COMPONENTSTATUS_API IComponentStatusFactory* getComponentStatusFactory();
+COMPONENTSTATUS_API IComponentStatusFactory* getComponentStatusFactory();

+ 1 - 0
esp/services/ws_machine/ws_machineService.cpp

@@ -23,6 +23,7 @@
 #include "roxiecommlibscm.hpp"
 #include "componentstatus.hpp"
 #include "rmtssh.hpp"
+#include "platform.h"
 
 #ifndef eqHoleCluster
 #define eqHoleCluster  "HoleCluster"

+ 9 - 0
system/include/platform.h

@@ -495,4 +495,13 @@ typedef __int64 cycle_t;
 // BUILD_TAG not needed here anymore - defined in build_tag.h
 //#define BUILD_TAG "build_0000" // Will get substituted during pre-build
 
+#ifdef _WINDOWS
+#ifndef popen
+#define popen   _popen
+#endif
+#ifndef pclose
+#define pclose  _pclose
+#endif
+#endif
+
 #endif