summaryrefslogtreecommitdiff
path: root/ext/readline
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
parent94fc95c8b04df32db8d473be058d4a98b72ab8ec (diff)
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')
-rw-r--r--ext/readline/extconf.rb2
-rw-r--r--ext/readline/readline.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb
index 4ddc763..42bcb51 100644
--- a/ext/readline/extconf.rb
+++ b/ext/readline/extconf.rb
@@ -52,6 +52,7 @@ else
end
end
+have_readline_func("rl_getc")
have_readline_func("rl_getc_function")
have_readline_func("rl_filename_completion_function")
have_readline_func("rl_username_completion_function")
@@ -74,6 +75,7 @@ have_readline_var("rl_point")
/mswin|bccwin|mingw/ !~ RUBY_PLATFORM && have_readline_var("rl_catch_sigwinch")
/mswin|bccwin|mingw/ !~ RUBY_PLATFORM && have_readline_var("rl_catch_signals")
have_readline_func("rl_cleanup_after_signal")
+have_readline_func("rl_free_line_state")
have_readline_func("rl_clear_signals")
have_readline_func("rl_set_screen_size")
have_readline_func("rl_get_screen_size")
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 3ecea94..b654fa0 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 */