From: Joel Rosdahl Date: Sat, 16 Jul 2011 13:33:37 +0000 (+0200) Subject: config: Use compiler_check from conf struct X-Git-Tag: v3.2~234 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a2fffabda163f9a7daa0351e53b4e7aa4f18dbd;p=thirdparty%2Fccache.git config: Use compiler_check from conf struct --- diff --git a/ccache.c b/ccache.c index bfa6e1b26..108a3c77a 100644 --- a/ccache.c +++ b/ccache.c @@ -867,7 +867,6 @@ static void calculate_common_hash(struct args *args, struct mdfour *hash) { struct stat st; - const char *compilercheck; char *p; hash_string(hash, HASH_PREFIX); @@ -888,22 +887,19 @@ calculate_common_hash(struct args *args, struct mdfour *hash) /* * Hash information about the compiler. */ - compilercheck = getenv("CCACHE_COMPILERCHECK"); - if (!compilercheck) { - compilercheck = "mtime"; - } - if (str_eq(compilercheck, "none")) { + if (str_eq(conf->compiler_check, "none")) { /* Do nothing. */ - } else if (str_eq(compilercheck, "content")) { + } else if (str_eq(conf->compiler_check, "content")) { hash_delimiter(hash, "cc_content"); hash_file(hash, args->argv[0]); - } else if (str_eq(compilercheck, "mtime")) { + } else if (str_eq(conf->compiler_check, "mtime")) { hash_delimiter(hash, "cc_mtime"); hash_int(hash, st.st_size); hash_int(hash, st.st_mtime); } else { /* command string */ - if (!hash_multicommand_output(hash, compilercheck, orig_args->argv[0])) { - fatal("Failure running compiler check command: %s", compilercheck); + if (!hash_multicommand_output( + hash, conf->compiler_check, orig_args->argv[0])) { + fatal("Failure running compiler check command: %s", conf->compiler_check); } }