Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make sure that we use Cat.exe on Windows instead cat.exe (mingw32).
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 25 Jun 2008 17:49:16 +0000 (17:49 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 25 Jun 2008 17:49:16 +0000 (17:49 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5826 48e7efb5-ca39-0410-a469-dd3cf9ba447f

tools/tesh2/src/fstream.c

index 60a70ac..f244865 100644 (file)
@@ -31,7 +31,7 @@
 \r
 #ifdef WIN32\r
 static int\r
 \r
 #ifdef WIN32\r
 static int\r
-is_w32_cmd(const char* cmd, char** path)\r
+is_w32_cmd(char* cmd, char** path)\r
 {\r
        size_t i = 0;\r
        struct stat stat_buff = {0};\r
 {\r
        size_t i = 0;\r
        struct stat stat_buff = {0};\r
@@ -51,6 +51,9 @@ is_w32_cmd(const char* cmd, char** path)
                {\r
                        for (i = 0; path[i] != NULL; i++)\r
                        {\r
                {\r
                        for (i = 0; path[i] != NULL; i++)\r
                        {\r
+                               /* use Cat.exe on Windows */\r
+                               if(!strcmp(cmd, "cat"))\r
+                                       cmd[0] = 'C';\r
                                \r
                                sprintf(buff,"%s\\%s",path[i], cmd);\r
                                \r
                                \r
                                sprintf(buff,"%s\\%s",path[i], cmd);\r
                                \r