diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ext/readline/extconf.rb | 6 | ||||
-rw-r--r-- | ext/readline/readline.c | 2 |
3 files changed, 16 insertions, 1 deletions
@@ -1,3 +1,12 @@ +Wed Jan 12 16:24:53 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp> + + * ext/readline/extconf.rb: new checks for RL_PROMPT_START_IGNORE + and RL_PROMPT_END_IGNORE. [ruby-core:34331] + + * ext/readline/readline.c: enables USE_INSERT_IGNORE_ESCAPE only if + RL_PROMPT_{START,END}_IGNORE are available to get rid of compilation + error with libedit. + Wed Jan 12 15:53:49 2011 NAKAMURA Usaku <usa@ruby-lang.org> * README.EXT.ja (rb_ensure): typo. diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb index efce64345a..59c2a8e95d 100644 --- a/ext/readline/extconf.rb +++ b/ext/readline/extconf.rb @@ -19,6 +19,10 @@ def have_readline_func(func) return have_func(func, $readline_headers) end +def have_readline_macro(macro) + return have_macro(macro, $readline_headers) +end + dir_config('curses') dir_config('ncurses') dir_config('termcap') @@ -79,4 +83,6 @@ have_readline_func("rl_emacs_editing_mode") have_readline_func("replace_history_entry") have_readline_func("remove_history") have_readline_func("clear_history") +have_readline_macro("RL_PROMPT_START_IGNORE") +have_readline_macro("RL_PROMPT_END_IGNORE") create_makefile("readline") diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 4e530be194..8236d5a5f1 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -44,7 +44,7 @@ static VALUE mReadline; #define EDIT_LINE_LIBRARY_VERSION "EditLine wrapper" #ifndef USE_INSERT_IGNORE_ESCAPE -# ifndef HAVE_EDITLINE_READLINE_H +# if !defined(HAVE_EDITLINE_READLINE_H) && defined(HAVE_RL_PROMPT_START_IGNORE) && defined(HAVE_RL_PROMPT_END_IGNORE) # define USE_INSERT_IGNORE_ESCAPE 1 # else # define USE_INSERT_IGNORE_ESCAPE 0 |