support cross-compilation for windows

This commit is contained in:
Vitor Santos Costa
2014-01-23 01:46:16 +00:00
parent fe6142ca69
commit 0391988788
8 changed files with 99 additions and 28 deletions

View File

@@ -330,6 +330,7 @@ int main(int argc, char **arg) {
SETMAXBUFSIZE(params.maxbufsize);
signal(SIGINT, termhandler);
#ifndef __MINGW32__
if (params.ppid != NULL) {
signal(SIGALRM, pidhandler);
alarm(5);
@@ -337,6 +338,7 @@ int main(int argc, char **arg) {
signal(SIGALRM, handler);
alarm(params.timeout);
}
#endif
if (params.online) {
if (params.dynreorder == 1)
@@ -1769,7 +1771,9 @@ void pidhandler(int num) {
s = (char *) malloc(sizeof(char) * (19 + strlen(params.ppid)));
strcpy(s, "ps "); strcat(s, params.ppid); strcat(s, " >/dev/null");
if (system(s) != 0) exit(4);
#ifndef __MINGW32__
signal(SIGALRM, pidhandler);
#endif
alarm(5);
free(s);
}

View File

@@ -284,6 +284,7 @@ int main(int argc, char **arg) {
SETMAXBUFSIZE(params.maxbufsize);
signal(SIGINT, termhandler);
#ifndef __MINGW32__
if (params.ppid != NULL) {
signal(SIGALRM, pidhandler);
alarm(5);
@@ -291,6 +292,7 @@ int main(int argc, char **arg) {
signal(SIGALRM, handler);
alarm(params.timeout);
}
#endif
if (params.online) {
MyManager.manager = simpleBDDinit(0);
@@ -688,7 +690,9 @@ void pidhandler(int num) {
s = (char *) malloc(sizeof(char) * (19 + strlen(params.ppid)));
strcpy(s, "ps "); strcat(s, params.ppid); strcat(s, " >/dev/null");
if (system(s) != 0) exit(4);
#ifndef __MINGW32__
signal(SIGALRM, pidhandler);
#endif
alarm(5);
free(s);
}