From: Ramiro Polla Date: Thu, 15 Jul 2010 18:48:10 +0000 (-0300) Subject: Add a define for path delimiter X-Git-Tag: v3.1~184 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f38e9f397a95e0d48820bc72fc5b8440749479de;p=thirdparty%2Fccache.git Add a define for path delimiter --- diff --git a/ccache.h b/ccache.h index 2cf1fa89e..041362d9d 100644 --- a/ccache.h +++ b/ccache.h @@ -190,4 +190,6 @@ typedef int (*COMPAR_FN_T)(const void *, const void *); #undef HAVE_MKSTEMP #endif +# define PATH_DELIM ":" + #endif /* ifndef CCACHE_H */ diff --git a/execute.c b/execute.c index d04f7e66e..0d689a30a 100644 --- a/execute.c +++ b/execute.c @@ -115,7 +115,7 @@ find_executable_in_path(const char *name, const char *exclude_name, char *path) /* search the path looking for the first compiler of the right name that isn't us */ - for (tok=strtok(path,":"); tok; tok = strtok(NULL, ":")) { + for (tok=strtok(path, PATH_DELIM); tok; tok = strtok(NULL, PATH_DELIM)) { struct stat st1, st2; char *fname; x_asprintf(&fname, "%s/%s", tok, name);