aboutsummaryrefslogtreecommitdiffstats
path: root/ext/readline/readline.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-16 22:50:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-16 22:50:40 +0000
commit1572070fa07dfc57cd63d0a2ab14538cf67005eb (patch)
treecb7d6c581bb2533812141c941c25c05d9c0f122f /ext/readline/readline.c
parent94fc95c8b04df32db8d473be058d4a98b72ab8ec (diff)
downloadruby-1572070fa07dfc57cd63d0a2ab14538cf67005eb.tar.gz
Tue Aug 17 07:50:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/readline/extconf.rb: check functions more. [ruby-core:31722] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/readline/readline.c')
-rw-r--r--ext/readline/readline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 3ecea944d1..b654fa099b 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -108,8 +108,8 @@ static char **readline_attempted_completion_function(const char *text,
static VALUE readline_instream;
static ID id_getbyte;
-#ifdef HAVE_EDITLINE_READLINE_H
-extern int rl_getc(FILE *);
+#ifndef HAVE_RL_GETC
+#define rl_getc(f) EOF
#endif
static int readline_getc(FILE *);
@@ -260,7 +260,9 @@ readline_readline(int argc, VALUE *argv, VALUE self)
if (status) {
#if defined HAVE_RL_CLEANUP_AFTER_SIGNAL
/* restore terminal mode and signal handler*/
+#if defined HAVE_RL_FREE_LINE_STATE
rl_free_line_state();
+#endif
rl_cleanup_after_signal();
#elif defined HAVE_RL_DEPREP_TERM_FUNCTION
/* restore terminal mode */