Commit 93bdde3a authored by Jonathan Liu's avatar Jonathan Liu Committed by Alexandre Julliard

winebuild: Use correct PATH separator on Windows.

parent e3fc518e
...@@ -39,6 +39,12 @@ ...@@ -39,6 +39,12 @@
#include "build.h" #include "build.h"
#ifdef _WIN32
# define PATH_SEPARATOR ';'
#else
# define PATH_SEPARATOR ':'
#endif
static const char **tmp_files; static const char **tmp_files;
static unsigned int nb_tmp_files; static unsigned int nb_tmp_files;
static unsigned int max_tmp_files; static unsigned int max_tmp_files;
...@@ -319,13 +325,13 @@ struct strarray *find_tool( const char *name, const char * const *names ) ...@@ -319,13 +325,13 @@ struct strarray *find_tool( const char *name, const char * const *names )
if (!getenv( "PATH" )) return NULL; if (!getenv( "PATH" )) return NULL;
path = xstrdup( getenv( "PATH" )); path = xstrdup( getenv( "PATH" ));
for (p = path, count = 2; *p; p++) if (*p == ':') count++; for (p = path, count = 2; *p; p++) if (*p == PATH_SEPARATOR) count++;
dirs = xmalloc( count * sizeof(*dirs) ); dirs = xmalloc( count * sizeof(*dirs) );
count = 0; count = 0;
dirs[count++] = p = path; dirs[count++] = p = path;
while (*p) while (*p)
{ {
while (*p && *p != ':') p++; while (*p && *p != PATH_SEPARATOR) p++;
if (!*p) break; if (!*p) break;
*p++ = 0; *p++ = 0;
dirs[count++] = p; dirs[count++] = p;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment