From 3d704802ddcd23c5396428d9bb96f96ae2de6e77 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 17 Jul 2009 13:31:00 +0000 Subject: [PATCH] * ext/readline/readline.c (Init_readline): use rl_catch_sigwinch only when existing. * ext/readline/extconf.rb: check existance of rl_catch_sigwinch, and workaround for native Win32 readline port. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ ext/readline/extconf.rb | 1 + ext/readline/readline.c | 2 ++ 3 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3ae5339e10..5b3ff92622 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Jul 17 22:29:21 2009 NAKAMURA Usaku + + * ext/readline/readline.c (Init_readline): use rl_catch_sigwinch only + when existing. + + * ext/readline/extconf.rb: check existance of rl_catch_sigwinch, and + workaround for native Win32 readline port. + Fri Jul 17 18:18:23 2009 Tanaka Akira * range.c (recursive_hash): extracted from range_hash. reject diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb index 512e28f627..bab6e3e726 100644 --- a/ext/readline/extconf.rb +++ b/ext/readline/extconf.rb @@ -65,6 +65,7 @@ have_readline_var("rl_line_buffer") have_readline_var("rl_point") # workaround for native windows. /mswin|bccwin|mingw/ !~ RUBY_PLATFORM && have_readline_var("rl_event_hook") +/mswin|bccwin|mingw/ !~ RUBY_PLATFORM && have_readline_var("rl_catch_sigwinch") have_readline_func("rl_cleanup_after_signal") have_readline_func("rl_clear_signals") have_readline_func("rl_set_screen_size") diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 45be3225ba..5f1c3553a8 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -1452,7 +1452,9 @@ Init_readline() rl_event_hook = readline_event; #endif rl_catch_signals = 0; +#ifdef HAVE_RL_CATCH_SIGWINCH rl_catch_sigwinch = 0; +#endif #ifdef HAVE_RL_CLEAR_SIGNALS rl_clear_signals(); #endif