From 2bb881148493651c577d95d55a4571c36de589b6 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 2 Mar 2014 02:13:41 +0000 Subject: [PATCH] extconf.rb: rl_hook_func_t for old readline * ext/readline/extconf.rb (rl_hook_func_t): define as Function for very old readline versions. [ruby-core:61209] [Bug #9578] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/readline/extconf.rb | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 500753d5b1..0627f85b8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Mar 2 11:13:30 2014 Nobuyoshi Nakada + + * ext/readline/extconf.rb (rl_hook_func_t): define as Function for + very old readline versions. [ruby-core:61209] [Bug #9578] + Sun Mar 2 10:56:12 2014 Zachary Scott * README.EXT: [DOC] Remove needless char diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb index 0b121c1ebe..5e3c9ea982 100644 --- a/ext/readline/extconf.rb +++ b/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') @@ -94,4 +98,8 @@ readline.have_func("clear_history") readline.have_func("rl_redisplay") readline.have_func("rl_insert_text") readline.have_func("rl_delete_text") +unless readline.have_type("rl_hook_func_t") + $DEFS << "-Drl_hook_func_t=Function" +end + create_makefile("readline")