aboutsummaryrefslogtreecommitdiffstats
path: root/common/gpgrlhelp.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/gpgrlhelp.c')
-rw-r--r--common/gpgrlhelp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/gpgrlhelp.c b/common/gpgrlhelp.c
index 56a9ce28c..ec72c98c8 100644
--- a/common/gpgrlhelp.c
+++ b/common/gpgrlhelp.c
@@ -40,6 +40,7 @@
#include "common-defs.h"
+#ifdef HAVE_LIBREADLINE
static void
set_completer (rl_completion_func_t *completer)
{
@@ -68,12 +69,15 @@ init_stream (FILE *fp)
rl_inhibit_completion = 1;
}
+#endif /*HAVE_LIBREADLINE*/
+
/* Initialize our readline code. This should be called as early as
possible as it is actually a constructur. */
void
gnupg_rl_initialize (void)
{
+#ifdef HAVE_LIBREADLINE
tty_private_set_rl_hooks (init_stream,
set_completer,
inhibit_completion,
@@ -81,7 +85,7 @@ gnupg_rl_initialize (void)
readline,
add_history);
rl_readline_name = "GnuPG";
-
+#endif
}