]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Let ignore_headers_in_manifest match full directory or file names
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Dec 2015 19:07:15 +0000 (20:07 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Dec 2015 19:07:15 +0000 (20:07 +0100)
ccache.c
ccache.h

index b9baacac1a6613d98dfb179a39a493ee50ed2a27..f9853e59ef5aa7b20a1ae5e652830f781c89d63b 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -581,7 +581,10 @@ remember_include_file(char *path, struct mdfour *cpp_hash, bool system)
                if (ignore_len > path_len) {
                        continue;
                }
-               if (strncmp(path, ignore, ignore_len) == 0) {
+               if (strncmp(path, ignore, ignore_len) == 0
+                   && (ignore[ignore_len-1] == DIR_DELIM_CH
+                       || path[ignore_len] == DIR_DELIM_CH
+                       || path[ignore_len] == '\0')) {
                        goto ignore;
                }
        }
index 71a13f02507f5d81c4fe6e105277853bb3f73b85..5789bf9e924e9eca3998eb1007e1858aee831942 100644 (file)
--- a/ccache.h
+++ b/ccache.h
@@ -274,10 +274,12 @@ void add_exe_ext_if_no_to_fullpath(char *full_path_win_ext, size_t max_size,
 #    define lstat(a,b) stat(a,b)
 #    define execv(a,b) win32execute(a,b,0,-1,-1)
 #    define execute(a,b,c) win32execute(*(a),a,1,b,c)
+#    define DIR_DELIM_CH '/'
 #    define PATH_DELIM ";"
 #    define F_RDLCK 0
 #    define F_WRLCK 0
 #else
+#    define DIR_DELIM_CH '\\'
 #    define PATH_DELIM ":"
 #endif