]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
config: Use read_only from conf struct
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 16 Jul 2011 17:37:14 +0000 (19:37 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 20 Jul 2011 21:31:37 +0000 (23:31 +0200)
ccache.c

index ce63eefb13df3bc085979e2cdaadde71b831795a..4dfe9f21dee2b75be7843f70ac833bb08f05f31b 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1150,7 +1150,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest)
        if (conf->direct_mode
            && put_object_in_manifest
            && included_files
-           && !getenv("CCACHE_READONLY")) {
+           && !conf->read_only) {
                struct stat st;
                size_t old_size = 0; /* in bytes */
                if (stat(manifest_path, &st) == 0) {
@@ -2055,7 +2055,7 @@ ccache(int argc, char *argv[])
        /* if we can return from cache at this point then do */
        from_cache(FROMCACHE_CPP_MODE, put_object_in_manifest);
 
-       if (getenv("CCACHE_READONLY")) {
+       if (conf->read_only) {
                cc_log("Read-only mode; running real compiler");
                failed();
        }