replace popen/pclose with _popen/_pclose on Windows

Environment

Platform build on Windows

Description

Current HPCC Platform build on Windows has following erros:

20:06:54 d:\Jenkins\workspace\CE-Platform-Libraries-Win64-6.0-test\CE\W2K8-x86_64-2\HPCC-Platform\esp\services\ws_machine\ws_machineService.cpp(1235): error C3861: 'popen': identifier not found [D:\Jenkins\workspace\CE-Platform-Libraries-Win64-6.0-test\CE\W2K8-x86_64-2\build\esp\services\ws_machine\ws_machine.vcxproj]

20:06:54 d:\Jenkins\workspace\CE-Platform-Libraries-Win64-6.0-test\CE\W2K8-x86_64-2\HPCC-Platform\esp\services\ws_machine\ws_machineService.cpp(1255): error C3861: 'pclose': identifier not found [D:\Jenkins\workspace\CE-Platform-Libraries-Win64-6.0-test\CE\W2K8-x86_64-2\build\esp\services\ws_machine\ws_machine.vcxproj]

20:06:54 d:\Jenkins\workspace\CE-Platform-Libraries-Win64-6.0-test\CE\W2K8-x86_64-2\HPCC-Platform\esp\services\ws_machine\componentstatus.cpp(335): error C2491: 'getComponentStatusFactory' : definition of dllimport function not allowed [D:\Jenkins\workspace\CE-Platform-Libraries-Win64-6.0-test\CE\W2K8-x86_64-2\build\esp\services\ws_machine\ws_machine.vcxproj]

For the first two _popen/_pclose should be used on Windows:

#ifdef _WINDOWS
if( (fp = _popen( command_line, "r" )) == NULL )
return -1;
#else
if( (fp = popen( command_line, "r" )) == NULL )
return -1;
#endif

For the last error "extern COMPONENTSTATUS_API" should be removed in cpp file

Conclusion

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Components

Assignee

Reporter

Priority

Fix versions

Pull Request URL

Affects versions

Created October 23, 2015 at 2:47 AM
Updated November 12, 2015 at 9:55 AM
Resolved November 12, 2015 at 9:55 AM