readline-fix.diff 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb
  2. index b820c0b..f299cba 100644
  3. --- a/ext/readline/extconf.rb
  4. +++ b/ext/readline/extconf.rb
  5. @@ -59,6 +59,9 @@ have_func("rl_cleanup_after_signal")
  6. have_func("rl_clear_signals")
  7. have_func("rl_vi_editing_mode")
  8. have_func("rl_emacs_editing_mode")
  9. +# workaround for native windows.
  10. +/mswin|bccwin|mingw/ !~ RUBY_PLATFORM && have_readline_var("rl_catch_sigwinch")
  11. +/mswin|bccwin|mingw/ !~ RUBY_PLATFORM && have_readline_var("rl_catch_signals")
  12. have_func("replace_history_entry")
  13. have_func("remove_history")
  14. create_makefile("readline")
  15. diff --git a/ext/readline/readline.c b/ext/readline/readline.c
  16. index c9acaad..637cb99 100644
  17. --- a/ext/readline/readline.c
  18. +++ b/ext/readline/readline.c
  19. @@ -833,6 +833,12 @@ Init_readline()
  20. #ifdef HAVE_RL_EVENT_HOOK
  21. rl_event_hook = readline_event;
  22. #endif
  23. +#ifdef HAVE_RL_CATCH_SIGNALS
  24. + rl_catch_signals = 0;
  25. +#endif
  26. +#ifdef HAVE_RL_CATCH_SIGWINCH
  27. + rl_catch_sigwinch = 0;
  28. +#endif
  29. #ifdef HAVE_RL_CLEAR_SIGNALS
  30. rl_clear_signals();
  31. #endif