]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
config: Use detect_shebang from conf struct
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 16 Jul 2011 14:07:46 +0000 (16:07 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 17 Jul 2011 09:57:52 +0000 (11:57 +0200)
execute.c

index 8773e71a4e46fecdc527c827f5fa62695cd5db06..5e4767019673eba200ac0879cc8ea6cc6f708361 100644 (file)
--- 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");