Module: wine Branch: master Commit: 93bdde3af2a303cdc72bce2aa59b11f9c0aebd0c URL: http://source.winehq.org/git/wine.git/?a=commit;h=93bdde3af2a303cdc72bce2aa5...
Author: Jonathan Liu net147@gmail.com Date: Sat Dec 14 10:02:21 2013 +1100
winebuild: Use correct PATH separator on Windows.
---
tools/winebuild/utils.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index d92a731..e838165 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -39,6 +39,12 @@
#include "build.h"
+#ifdef _WIN32 +# define PATH_SEPARATOR ';' +#else +# define PATH_SEPARATOR ':' +#endif + static const char **tmp_files; static unsigned int nb_tmp_files; static unsigned int max_tmp_files; @@ -319,13 +325,13 @@ struct strarray *find_tool( const char *name, const char * const *names )
if (!getenv( "PATH" )) return NULL; 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) ); count = 0; dirs[count++] = p = path; while (*p) { - while (*p && *p != ':') p++; + while (*p && *p != PATH_SEPARATOR) p++; if (!*p) break; *p++ = 0; dirs[count++] = p;