Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define correctly variables for windows.
[simgrid.git] / tools / tesh2 / src / command.c
index 3f911f6..677979f 100644 (file)
@@ -18,7 +18,7 @@
 #include <reader.h>\r
 #include <timer.h>\r
 \r
-#ifndef WIN32\r
+#ifndef _XBT_WIN32\r
 #include <sys/types.h>\r
 #include <sys/wait.h>\r
 #include <sys/stat.h>\r
@@ -150,7 +150,7 @@ command_new(unit_t unit, context_t context, xbt_os_mutex_t mutex)
        command->root->cmd_nb++;\r
        xbt_os_mutex_release(mutex);\r
 \r
-       #ifndef WIN32\r
+       #ifndef _XBT_WIN32\r
        command->killed = 0;\r
        command->execlp_errno = 0;\r
        #endif\r
@@ -209,7 +209,7 @@ command_start(void* p)
 \r
        /* execute the command of the test */\r
 \r
-       #ifndef WIN32\r
+       #ifndef _XBT_WIN32\r
        command_exec(command, command->context->command_line);\r
        #else\r
        /* play the translated command line on Windows */\r
@@ -257,7 +257,7 @@ command_start(void* p)
        return NULL;\r
 }\r
 \r
-#ifdef WIN32\r
+#ifdef _XBT_WIN32\r
 \r
 #ifndef BUFSIZE\r
 #define BUFSIZE        4096\r
@@ -666,7 +666,7 @@ command_exec(command_t command, const char* command_line)
 }\r
 #endif\r
 \r
-#ifdef WIN32\r
+#ifdef _XBT_WIN32\r
 void\r
 command_wait(command_t command)\r
 {\r
@@ -809,7 +809,7 @@ command_check(command_t command)
        while(!command->reader->done)\r
                xbt_os_thread_yield();\r
 \r
-       #ifdef WIN32\r
+       #ifdef _XBT_WIN32\r
        CloseHandle(command->stdout_fd);\r
        #else\r
        close(command->stdout_fd);\r
@@ -889,7 +889,7 @@ command_check(command_t command)
        }\r
 }\r
 \r
-#ifdef WIN32\r
+#ifdef _XBT_WIN32\r
 void\r
 command_kill(command_t command)\r
 {\r
@@ -954,7 +954,7 @@ command_summarize(command_t command)
        if(cs_successeded != command->status)\r
        {\r
 \r
-               #ifndef WIN32\r
+               #ifndef _XBT_WIN32\r
                if(command->killed)\r
                        printf("          <killed command>\n");\r
                #endif\r
@@ -1177,7 +1177,7 @@ command_free(command_t* ptr)
 {\r
        /* close the stdin and the stdout pipe handles */\r
 \r
-       #ifdef WIN32\r
+       #ifdef _XBT_WIN32\r
        if((*ptr)->stdin_fd != INDEFINITE_FD)\r
                CloseHandle((*ptr)->stdin_fd);\r
 \r