bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20450: coreutils cannot built with clang


From: Yunlian Jiang
Subject: bug#20450: coreutils cannot built with clang
Date: Tue, 28 Apr 2015 12:38:53 -0700

Hi, 
   When I try to use clang to build coreutils, I got some thing like
src/coreutils.c:81:3:   AR       src/libsinglebin_printenv.a
error: embedding a #include directive within macro arguments is not supported
# include "coreutils.h"
  ^
And I have the following ugly patch to make it work.
Thanks

---
 src/coreutils.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/coreutils.c b/src/coreutils.c
index 9f798b8..c46f0c7 100644
--- a/src/coreutils.c
+++ b/src/coreutils.c
@@ -70,15 +70,22 @@ Execute the PROGRAM_NAME built-in program with the given PARAMETERS.\n\
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);

-      printf ("\n\
-Built-in programs:\n"
 #ifdef SINGLE_BINARY
 /* XXX: Ideally we#d like to present "install" here, not "ginstall".  */
+      const char * prog_list_name =
 # define SINGLE_BINARY_PROGRAM(prog_name_str, main_name) " " prog_name_str
 # include "coreutils.h"
 # undef SINGLE_BINARY_PROGRAM
+       ;
+#endif
+
+      printf ("\n\
+Built-in programs:\n");
+
+#ifdef SINGLE_BINARY
+      printf("%s", prog_list_name);
 #endif
-  "\n");
+      printf("\n");

       printf (_("\
 \n\
-- 
2.2.0.rc0.207.ga3a616c


reply via email to

[Prev in Thread] Current Thread [Next in Thread]