From: Joel Rosdahl Date: Tue, 22 Dec 2015 19:07:15 +0000 (+0100) Subject: Let ignore_headers_in_manifest match full directory or file names X-Git-Tag: v3.3~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a61d0f24292f94a51e0f271cc184416e3d4a979b;p=thirdparty%2Fccache.git Let ignore_headers_in_manifest match full directory or file names --- diff --git a/ccache.c b/ccache.c index b9baacac1..f9853e59e 100644 --- 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; } } diff --git a/ccache.h b/ccache.h index 71a13f025..5789bf9e9 100644 --- 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