-
-
Save riocampos/b2669b26016207224f06 to your computer and use it in GitHub Desktop.
Ruby 2.0.0-p451(or p353/p247/p195/p0) readline 6.3.3 patch (original: https://gist.github.com/mislav/a18b9d7f0dc5b9efc162 in Ruby 2.1.1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: ext/readline/extconf.rb | |
=================================================================== | |
--- ext/readline/extconf.rb | |
+++ ext/readline/extconf.rb | |
@@ -19,6 +19,10 @@ def readline.have_func(func) | |
return super(func, headers) | |
end | |
+def readline.have_type(type) | |
+ return super(type, headers) | |
+end | |
+ | |
dir_config('curses') | |
dir_config('ncurses') | |
dir_config('termcap') | |
@@ -93,4 +97,10 @@ readline.have_func("remove_history") | |
readline.have_func("clear_history") | |
readline.have_func("rl_redisplay") | |
readline.have_func("rl_insert_text") | |
+unless readline.have_type("rl_hook_func_t") | |
+ # rl_hook_func_t is available since readline-4.2 (2001). | |
+ # Function is removed at readline-6.3 (2014). | |
+ # However, editline (NetBSD 6.1.3, 2014) doesn't have rl_hook_func_t. | |
+ $DEFS << "-Drl_hook_func_t=Function" | |
+end | |
create_makefile("readline") | |
Index: ext/readline/readline.c | |
=================================================================== | |
--- ext/readline/readline.c | |
+++ ext/readline/readline.c | |
@@ -1883,7 +1883,7 @@ Init_readline() | |
rl_attempted_completion_function = readline_attempted_completion_function; | |
#if defined(HAVE_RL_PRE_INPUT_HOOK) | |
- rl_pre_input_hook = (Function *)readline_pre_input_hook; | |
+ rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook; | |
#endif | |
#ifdef HAVE_RL_CATCH_SIGNALS | |
rl_catch_signals = 0; |
Thanks!
Thanks report, Dexyne !
I check the other patch versions of 2.0.0, so this patch works ALL.
The description changed.
Thanks !
This patch works to install Ruby 2.0.0-p195 on Ubuntu 14.04 LTS.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, works fine for ruby 2.0.0-p353.