From: John Darrington Date: Sat, 18 Jan 2014 17:38:20 +0000 (+0100) Subject: Do not attempt to replace rl_echo_signal_char if no readline is in use X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c715c0e2985569be39d5eacb23fd00dcfbd9f393;p=pspp Do not attempt to replace rl_echo_signal_char if no readline is in use --- diff --git a/src/ui/terminal/terminal-reader.c b/src/ui/terminal/terminal-reader.c index c80a6131de..96a69d7bc4 100644 --- a/src/ui/terminal/terminal-reader.c +++ b/src/ui/terminal/terminal-reader.c @@ -108,12 +108,15 @@ terminal_reader_cast (struct lex_reader *r) return UP_CAST (r, struct terminal_reader, reader); } + /* Older libreadline versions do not provide rl_outstream. However, it is almost always going to be the same as stdout. */ #if ! HAVE_RL_OUTSTREAM # define rl_outstream stdout #endif + +#if HAVE_READLINE /* Similarly, rl_echo_signal_char is fairly recent. We provide our own crude version if it is not present. */ #if ! HAVE_RL_ECHO_SIGNAL_CHAR @@ -138,6 +141,7 @@ rl_echo_signal_char (int sig) fflush (rl_outstream); } #endif +#endif static size_t