- vc++ compile fixes
This commit is contained in:
parent
817d8cfea8
commit
0b67911199
|
@ -1101,7 +1101,12 @@ bool executeShellCommand(string cmd) {
|
||||||
bool result = false;
|
bool result = false;
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\nAbout to run [%s]", cmd.c_str());
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\nAbout to run [%s]", cmd.c_str());
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
FILE *file = _popen(cmd.c_str(),"r");
|
||||||
|
#else
|
||||||
FILE *file = popen(cmd.c_str(),"r");
|
FILE *file = popen(cmd.c_str(),"r");
|
||||||
|
#endif
|
||||||
|
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\nfile = [%p]", file);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\nfile = [%p]", file);
|
||||||
|
|
||||||
if(file != NULL) {
|
if(file != NULL) {
|
||||||
|
@ -1111,8 +1116,12 @@ bool executeShellCommand(string cmd) {
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("%s",szBuf);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("%s",szBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef WIN32
|
||||||
|
int cmdRet = _pclose(file);
|
||||||
|
#else
|
||||||
int cmdRet = pclose(file);
|
int cmdRet = pclose(file);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Close pipe and print return value. */
|
/* Close pipe and print return value. */
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\nProcess returned %d", cmdRet);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\nProcess returned %d", cmdRet);
|
||||||
result = true;
|
result = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user