summaryrefslogtreecommitdiff
path: root/src/coreutils.c
diff options
context:
space:
mode:
authorYunlian Jiang <yunlian@chromium.org>2015-04-28 23:47:20 +0100
committerPádraig Brady <P@draigBrady.com>2015-04-28 23:48:30 +0100
commitc77a96ccba91ca687fe0c22e3b2bb1141fbab421 (patch)
tree98a41553475c7f3484fffa8eeef358d6856a4d8a /src/coreutils.c
parentbdf6837655730c09a42cfd0a23c984e1410370f5 (diff)
downloadcoreutils-c77a96ccba91ca687fe0c22e3b2bb1141fbab421.tar.gz
build: fix SINGLE_BINARY build when printf is a macro
* src/coreutils.c (usage): include coreutils.h outside the printf call, because if it's a macro you will get the error: embedding a #include directive within macro arguments is not supported
Diffstat (limited to 'src/coreutils.c')
-rw-r--r--src/coreutils.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/coreutils.c b/src/coreutils.c
index 9f798b808..7f868347d 100644
--- a/src/coreutils.c
+++ b/src/coreutils.c
@@ -70,15 +70,17 @@ 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". */
+/* XXX: Ideally we'd like to present "install" here, not "ginstall". */
+ char const *prog_name_list =
# define SINGLE_BINARY_PROGRAM(prog_name_str, main_name) " " prog_name_str
# include "coreutils.h"
# undef SINGLE_BINARY_PROGRAM
+ ;
+ printf ("\n\
+Built-in programs:\n\
+%s\n", prog_name_list);
#endif
- "\n");
printf (_("\
\n\