]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
check for output to stdout
authorAndrew Tridgell <tridge@samba.org>
Tue, 7 Jan 2003 05:06:07 +0000 (06:06 +0100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 7 Jan 2003 05:06:07 +0000 (06:06 +0100)
ccache.c
ccache.h
stats.c

index 43aaf0b7e8213760002e6c43a8fb1a4528e7bd81..aa47203751e2cd1fc1407e58319173762520219f 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -727,6 +727,13 @@ static void process_args(int argc, char **argv)
                failed();
        }
 
+
+       /* don't try to second guess the compilers heuristics for stdout handling */
+       if (strcmp(output_file, "-") == 0) {
+               stats_update(STATS_OUTSTDOUT);
+               failed();
+       }
+
        if (!output_file) {
                char *p;
                output_file = x_strdup(input_file);
index 4261cbc0470227ded91337c6d6738756798c0d31..f90505d054894294941b8f1a993997efe8c04f1b 100644 (file)
--- a/ccache.h
+++ b/ccache.h
@@ -55,6 +55,7 @@ enum stats {
        STATS_MULTIPLE,
        STATS_CONFTEST,
        STATS_UNSUPPORTED,
+       STATS_OUTSTDOUT,
 
        STATS_END
 };
diff --git a/stats.c b/stats.c
index b9a6f2c5f9ed8a319520efd4526634fe4db4f869..e2bda3d783eb4dffef5a01f19d7239db06678f0c 100644 (file)
--- a/stats.c
+++ b/stats.c
@@ -52,6 +52,7 @@ static struct {
        { STATS_NOTC,         "not a C/C++ file               ", NULL, 0 },
        { STATS_CONFTEST,     "autoconf compile/link          ", NULL, 0 },
        { STATS_UNSUPPORTED,  "unsupported compiler option    ", NULL, 0 },
+       { STATS_OUTSTDOUT,    "output to stdout               ", NULL, 0 },
        { STATS_DEVICE,       "output to a non-regular file   ", NULL, 0 },
        { STATS_NOINPUT,      "no input file                  ", NULL, 0 },
        { STATS_NUMFILES,     "files in cache                 ", NULL, FLAG_NOZERO|FLAG_ALWAYS },