summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-17 13:31:00 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-17 13:31:00 +0000
commit3d704802ddcd23c5396428d9bb96f96ae2de6e77 (patch)
treeaa01fa8df587539df54c190e10b33db0a5a620d1 /ext/readline
parentbc2df4136536496e72a8bbdf14a8980f65b259b8 (diff)
* 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
Diffstat (limited to 'ext/readline')
-rw-r--r--ext/readline/extconf.rb1
-rw-r--r--ext/readline/readline.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb
index 512e28f..bab6e3e 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 45be322..5f1c355 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