summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-12-29 18:05:06 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-12-29 18:05:06 -0800
commitfd7ea1067e101d2a58030c37620c8f1099a2258b (patch)
treea95f8b0a02a1953de1052e41d654b96368378765
parentbb8686b03f1a4f1f010faaee8e5dd5eb399f7b99 (diff)
downloadtxr-fd7ea1067e101d2a58030c37620c8f1099a2258b.tar.gz
txr-fd7ea1067e101d2a58030c37620c8f1099a2258b.tar.bz2
txr-fd7ea1067e101d2a58030c37620c8f1099a2258b.zip
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.
-rw-r--r--txr.c13
1 files 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"