summaryrefslogtreecommitdiffstats
path: root/txr.c
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
commitfe79d64ca0f94720280a6755af29ceb1e5420518 (patch)
treea95f8b0a02a1953de1052e41d654b96368378765 /txr.c
parent6dd6bb908e06f0dfa5666c93683387da5cfa877d (diff)
downloadtxr-fe79d64ca0f94720280a6755af29ceb1e5420518.tar.gz
txr-fe79d64ca0f94720280a6755af29ceb1e5420518.tar.bz2
txr-fe79d64ca0f94720280a6755af29ceb1e5420518.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.
Diffstat (limited to 'txr.c')
-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"