From 72e4e4faccc5b87ee88c13c05cd6234a836a6653 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 28 Aug 2016 14:33:42 +0200 Subject: [PATCH] Make GCC 4.6 happy refs #12576 --- tools/mkembedconfig/mkembedconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mkembedconfig/mkembedconfig.c b/tools/mkembedconfig/mkembedconfig.c index 0050bc7e7..b595a6bca 100644 --- a/tools/mkembedconfig/mkembedconfig.c +++ b/tools/mkembedconfig/mkembedconfig.c @@ -47,7 +47,7 @@ int main(int argc, char **argv) fprintf(outfp, "/* This file has been automatically generated\n" " from the input file \"%s\". */\n\n", argv[1]); - fprintf(outfp, "#include \"config/configfragment.hpp\"\n\nREGISTER_CONFIG_FRAGMENT(\"%s\", R\"CONFIG_FRAGMENT(\n", argv[1]); + fputs("#include \"config/configfragment.hpp\"\n\nnamespace {\n\nconst char *fragment = R\"CONFIG_FRAGMENT(", outfp); while (!feof(infp)) { char buf[1024]; @@ -59,7 +59,7 @@ int main(int argc, char **argv) fwrite(buf, rc, 1, outfp); } - fputs(")CONFIG_FRAGMENT\");", outfp); + fprintf(outfp, ")CONFIG_FRAGMENT\";\n\nREGISTER_CONFIG_FRAGMENT(\"%s\", fragment);\n\n}", argv[1]); fclose(outfp); fclose(infp);