fixed compilation of simplecuddLPADs under windows

This commit is contained in:
Fabrizio Riguzzi 2010-07-30 12:36:13 +02:00
parent b92c459968
commit 46be35d281

View File

@ -288,7 +288,7 @@ int main(int argc, char **arg) {
if (params.debug) DEBUGON; if (params.debug) DEBUGON;
RAPIDLOADON; RAPIDLOADON;
SETMAXBUFSIZE(params.maxbufsize); SETMAXBUFSIZE(params.maxbufsize);
#ifndef _WIN32
signal(SIGINT, termhandler); signal(SIGINT, termhandler);
if (params.ppid != NULL) { if (params.ppid != NULL) {
signal(SIGALRM, pidhandler); signal(SIGALRM, pidhandler);
@ -297,6 +297,7 @@ int main(int argc, char **arg) {
signal(SIGALRM, handler); signal(SIGALRM, handler);
alarm(params.timeout); alarm(params.timeout);
} }
#endif
if (params.online) { if (params.online) {
MyManager.manager = simpleBDDinit(0); MyManager.manager = simpleBDDinit(0);
MyManager.t = HIGH(MyManager.manager); MyManager.t = HIGH(MyManager.manager);
@ -344,8 +345,9 @@ int main(int argc, char **arg) {
break; break;
} }
} }
#ifndef _WIN32
alarm(0); alarm(0);
#endif
// problem specifics // problem specifics
if (bdd != NULL) { if (bdd != NULL) {
@ -625,8 +627,10 @@ void pidhandler(int num) {
s = (char *) malloc(sizeof(char) * (19 + strlen(params.ppid))); s = (char *) malloc(sizeof(char) * (19 + strlen(params.ppid)));
strcpy(s, "ps "); strcat(s, params.ppid); strcat(s, " >/dev/null"); strcpy(s, "ps "); strcat(s, params.ppid); strcat(s, " >/dev/null");
if (system(s) != 0) exit(4); if (system(s) != 0) exit(4);
#ifndef _WIN32
signal(SIGALRM, pidhandler); signal(SIGALRM, pidhandler);
alarm(5); alarm(5);
#endif
free(s); free(s);
} }