]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add a define for path delimiter
authorRamiro Polla <ramiro.polla@gmail.com>
Thu, 15 Jul 2010 18:48:10 +0000 (15:48 -0300)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 16 Jul 2010 14:19:54 +0000 (16:19 +0200)
ccache.h
execute.c

index 2cf1fa89e7a836643fa5244dc05b021f81e1cef7..041362d9dc54fe0b33d123bcace4ca174fac96d9 100644 (file)
--- 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 */
index d04f7e66e935ff775e10b9f10c08c44c8d87ae94..0d689a30a643e6c42123c13767967fe10c5b9719 100644 (file)
--- 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);