aboutsummaryrefslogtreecommitdiffstats
path: root/util/ttyio.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-12-18 22:23:49 +0000
committerDavid Shaw <[email protected]>2004-12-18 22:23:49 +0000
commit005b1d7960c0371207af42a4a060a6dd9cc72fac (patch)
treec39f1653def62376c7b684ed514142c25fee87cd /util/ttyio.c
parent* configure.ac: Add a --with-ldap=DIR so people can add to the search (diff)
downloadgnupg-005b1d7960c0371207af42a4a060a6dd9cc72fac.tar.gz
gnupg-005b1d7960c0371207af42a4a060a6dd9cc72fac.zip
Readline fix to be robust against platforms where readline has its own
dependencies. We play guess-the-depedency for a while, and try termcap, curses, and ncurses.
Diffstat (limited to 'util/ttyio.c')
-rw-r--r--util/ttyio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/ttyio.c b/util/ttyio.c
index f5b761f14..b7dd47173 100644
--- a/util/ttyio.c
+++ b/util/ttyio.c
@@ -46,7 +46,7 @@
#endif
#include <errno.h>
#include <ctype.h>
-#ifdef HAVE_READLINE_READLINE_H
+#ifdef HAVE_LIBREADLINE
#include <readline/readline.h>
#include <readline/history.h>
#endif
@@ -162,7 +162,7 @@ init_ttyfp(void)
tty_get_ttyname (), strerror(errno) );
exit(2);
}
-#if defined(HAVE_READLINE_READLINE_H) && defined(HAVE_LIBREADLINE)
+#ifdef HAVE_LIBREADLINE
rl_catch_signals = 0;
rl_instream = rl_outstream = ttyfp;
#endif
@@ -512,7 +512,7 @@ do_get( const char *prompt, int hidden )
char *
tty_get( const char *prompt )
{
-#if defined(HAVE_READLINE_READLINE_H) && defined(HAVE_LIBREADLINE)
+#ifdef HAVE_LIBREADLINE
if (!batchmode && !no_terminal) {
char *line;
char *buf;
@@ -544,7 +544,7 @@ tty_get( const char *prompt )
return buf;
}
else
-#endif /* HAVE_READLINE_READLINE_H && HAVE_LIBREADLINE */
+#endif /* HAVE_LIBREADLINE */
return do_get( prompt, 0 );
}