summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-12 07:26:15 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-12 07:26:15 +0000
commit6c977786187b4287c53c3df1de2a20df89feab72 (patch)
tree21285e232c01c851f0ff1f1ecd7573af180aad18 /ext/readline
parent596872f21d9c1fd61b0ef525ac09aecbebea4954 (diff)
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/readline')
-rw-r--r--ext/readline/extconf.rb6
-rw-r--r--ext/readline/readline.c2
2 files changed, 7 insertions, 1 deletions
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