Add a define for path delimiter

This commit is contained in:
Ramiro Polla 2010-07-15 15:48:10 -03:00 committed by Joel Rosdahl
parent 0bdaeb12a0
commit f38e9f397a
2 changed files with 3 additions and 1 deletions

View File

@ -190,4 +190,6 @@ typedef int (*COMPAR_FN_T)(const void *, const void *);
#undef HAVE_MKSTEMP
#endif
# define PATH_DELIM ":"
#endif /* ifndef CCACHE_H */

View File

@ -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);