From: Joel Rosdahl Date: Sat, 16 Jul 2011 14:07:46 +0000 (+0200) Subject: config: Use detect_shebang from conf struct X-Git-Tag: v3.2~229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ec410b4bd821b5a03fc543faaa297a0aabae1a87;p=thirdparty%2Fccache.git config: Use detect_shebang from conf struct --- diff --git a/execute.c b/execute.c index 8773e71a4..5e4767019 100644 --- a/execute.c +++ b/execute.c @@ -18,6 +18,9 @@ */ #include "ccache.h" +#include "conf.h" + +extern struct conf *conf; static char * find_executable_in_path(const char *name, const char *exclude_name, char *path); @@ -98,7 +101,7 @@ win32getshell(char *path) ext = get_extension(path); if (ext && strcasecmp(ext, ".sh") == 0 && (path_env = getenv("PATH"))) sh = find_executable_in_path("sh.exe", NULL, path_env); - if (!sh && getenv("CCACHE_DETECT_SHEBANG")) { + if (!sh && conf->detect_shebang) { /* Detect shebang. */ FILE *fp; fp = fopen(path, "r");