From fd7ea1067e101d2a58030c37620c8f1099a2258b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 29 Dec 2021 18:05:06 -0800 Subject: help: fix preprocessor directive in macro call. * txr.c (IF_HAVE_FORK_STUFF): New macro, conditionally defined. (help): Remove #if in the middle of a lit() macro call in favor of IF_HAVE_FORK_STUFF. --- txr.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/txr.c b/txr.c index f29ce7bd..003e4f58 100644 --- a/txr.c +++ b/txr.c @@ -82,6 +82,12 @@ int opt_compat; int opt_dbg_expansion; val stdlib_path; +#if HAVE_FORK_STUFF +#define IF_HAVE_FORK_STUFF(THEN, ELSE) THEN +#else +#define IF_HAVE_FORK_STUFF(THEN, ELSE) ELSE +#endif + static void help(void) { val text = lit( @@ -169,9 +175,10 @@ static void help(void) " copies of it to be to be embedded in the\n" " encoded arguments. See the manual.\n" "--noprofile Do not read .txr_profile when entering listener.\n" -#if HAVE_FORK_STUFF -"--reexec Re-execute TXR with remaining arguments.\n" -#endif +IF_HAVE_FORK_STUFF( +"--reexec Re-execute TXR with remaining arguments.\n", +"" +) "--debug-autoload Allow debugger to step through library auto-loading.\n" "--debug-expansion Allow debugger to step through macro-expansion of query.\n" "--yydebug Debug Yacc parser, if compiled with YYDEBUG support.\n" -- cgit v1.2.3