diff options
author | Ulrich Mueller <ulm@gentoo.org> | 2011-01-05 13:31:36 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-01-07 15:03:27 -0800 |
commit | 117021570515fa985670f78d27376d636ed5490f (patch) | |
tree | da03378ac23544cf92c100f2aa1d479c54d43766 | |
parent | 44c65a03644b1c297ee84ff1aa4b7790caa5da0b (diff) |
Call C preprocessor with -P option due to changed behaviour in GCC 4.5
http://bugs.freedesktop.org/show_bug.cgi?id=32701
http://bugs.gentoo.org/show_bug.cgi?id=347758
Signed-off-by: Ulrich Mueller <ulm@gentoo.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xrdb.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1179,7 +1179,7 @@ Process(int scrno, Bool doScreen, Bool execute) fprintf(input, "\n#include \"%s\"\n", filename); fclose(input); (void) mktemp(tmpname3); - if (asprintf(&cmd, "%s%s %s > %s", cpp_program, includes.val, + if (asprintf(&cmd, "%s -P%s %s > %s", cpp_program, includes.val, tmpname2, tmpname3) == -1) fatal("%s: Out of memory\n", ProgramName); if (system(cmd) < 0) @@ -1194,7 +1194,7 @@ Process(int scrno, Bool doScreen, Bool execute) fprintf(stdin, "\n#include \"%s\"\n", filename); fflush(stdin); fseek(stdin, 0, 0); - if (asprintf(&cmd, "%s%s", cpp_program, includes.val) == -1) + if (asprintf(&cmd, "%s -P%s", cpp_program, includes.val) == -1) fatal("%s: Out of memory\n", ProgramName); if (!(input = popen(cmd, "r"))) fatal("%s: cannot run '%s'\n", ProgramName, cmd); @@ -1209,7 +1209,7 @@ Process(int scrno, Bool doScreen, Bool execute) if (cpp_program) { #ifdef WIN32 (void) mktemp(tmpname3); - if (asprintf(&cmd, "%s%s %s %s > %s", cpp_program, + if (asprintf(&cmd, "%s -P%s %s %s > %s", cpp_program, includes.val, defines.val, filename ? filename : "", tmpname3) == -1) fatal("%s: Out of memory\n", ProgramName); @@ -1219,7 +1219,7 @@ Process(int scrno, Bool doScreen, Bool execute) if (!(input = fopen(tmpname3, "r"))) fatal("%s: can't open file '%s'\n", ProgramName, tmpname3); #else - if (asprintf(&cmd, "%s%s %s %s", cpp_program, + if (asprintf(&cmd, "%s -P%s %s %s", cpp_program, includes.val, defines.val, filename ? filename : "") == -1) fatal("%s: Out of memory\n", ProgramName); |