2013-11-23 20:28:11 +00:00
|
|
|
--- configure.orig 2013-11-23 20:56:02.000000000 +0200
|
|
|
|
|
+++ configure 2013-11-23 21:01:51.000000000 +0200
|
|
|
|
|
@@ -13871,9 +13871,9 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
$as_echo_n "checking how to link readline libs... " >&6; }
|
2012-08-13 14:42:32 +00:00
|
|
|
for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
|
2012-03-06 07:40:54 +00:00
|
|
|
if test -z "$py_libtermcap"; then
|
|
|
|
|
- READLINE_LIBS="-lreadline"
|
|
|
|
|
+ READLINE_LIBS="-ledit"
|
|
|
|
|
else
|
|
|
|
|
- READLINE_LIBS="-lreadline -l$py_libtermcap"
|
|
|
|
|
+ READLINE_LIBS="-ledit -l$py_libtermcap"
|
|
|
|
|
fi
|
|
|
|
|
LIBS="$READLINE_LIBS $LIBS_no_readline"
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -13917,13 +13917,13 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# check for readline 2.1
|
|
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
|
|
|
|
|
-$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
|
|
|
|
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -ledit" >&5
|
|
|
|
|
+$as_echo_n "checking for rl_callback_handler_install in -ledit... " >&6; }
|
|
|
|
|
if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
|
|
|
|
|
$as_echo_n "(cached) " >&6
|
|
|
|
|
else
|
|
|
|
|
ac_check_lib_save_LIBS=$LIBS
|
|
|
|
|
-LIBS="-lreadline $READLINE_LIBS $LIBS"
|
|
|
|
|
+LIBS="-ledit $READLINE_LIBS $LIBS"
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
/* end confdefs.h. */
|
|
|
|
|
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -13963,7 +13963,7 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
# check for readline 2.2
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
/* end confdefs.h. */
|
|
|
|
|
-#include <readline/readline.h>
|
|
|
|
|
+#include <editline/readline.h>
|
|
|
|
|
_ACEOF
|
|
|
|
|
if ac_fn_c_try_cpp "$LINENO"; then :
|
|
|
|
|
have_readline=yes
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -13976,7 +13976,7 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
then
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
/* end confdefs.h. */
|
|
|
|
|
-#include <readline/readline.h>
|
|
|
|
|
+#include <editline/readline.h>
|
|
|
|
|
|
|
|
|
|
_ACEOF
|
|
|
|
|
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -13989,7 +13989,7 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
/* end confdefs.h. */
|
|
|
|
|
-#include <readline/readline.h>
|
|
|
|
|
+#include <editline/readline.h>
|
|
|
|
|
|
|
|
|
|
_ACEOF
|
|
|
|
|
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -14003,13 +14003,13 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# check for readline 4.0
|
|
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
|
|
|
|
|
-$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
|
|
|
|
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -ledit" >&5
|
|
|
|
|
+$as_echo_n "checking for rl_pre_input_hook in -ledit... " >&6; }
|
|
|
|
|
if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
|
|
|
|
|
$as_echo_n "(cached) " >&6
|
|
|
|
|
else
|
|
|
|
|
ac_check_lib_save_LIBS=$LIBS
|
|
|
|
|
-LIBS="-lreadline $READLINE_LIBS $LIBS"
|
|
|
|
|
+LIBS="-ledit $READLINE_LIBS $LIBS"
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
/* end confdefs.h. */
|
|
|
|
|
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -14047,13 +14047,13 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# also in 4.0
|
|
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
|
|
|
|
|
-$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
|
|
|
|
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -ledit" >&5
|
|
|
|
|
+$as_echo_n "checking for rl_completion_display_matches_hook in -ledit... " >&6; }
|
|
|
|
|
if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
|
|
|
|
|
$as_echo_n "(cached) " >&6
|
|
|
|
|
else
|
|
|
|
|
ac_check_lib_save_LIBS=$LIBS
|
|
|
|
|
-LIBS="-lreadline $READLINE_LIBS $LIBS"
|
|
|
|
|
+LIBS="-ledit $READLINE_LIBS $LIBS"
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
/* end confdefs.h. */
|
|
|
|
|
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -14091,13 +14091,13 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# check for readline 4.2
|
|
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
|
|
|
|
|
-$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
|
|
|
|
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -ledit" >&5
|
|
|
|
|
+$as_echo_n "checking for rl_completion_matches in -ledit... " >&6; }
|
|
|
|
|
if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
|
|
|
|
|
$as_echo_n "(cached) " >&6
|
|
|
|
|
else
|
|
|
|
|
ac_check_lib_save_LIBS=$LIBS
|
|
|
|
|
-LIBS="-lreadline $READLINE_LIBS $LIBS"
|
|
|
|
|
+LIBS="-ledit $READLINE_LIBS $LIBS"
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
/* end confdefs.h. */
|
|
|
|
|
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -14137,7 +14137,7 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
# also in readline 4.2
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
/* end confdefs.h. */
|
|
|
|
|
-#include <readline/readline.h>
|
|
|
|
|
+#include <editline/readline.h>
|
|
|
|
|
_ACEOF
|
|
|
|
|
if ac_fn_c_try_cpp "$LINENO"; then :
|
|
|
|
|
have_readline=yes
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -14150,7 +14150,7 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
then
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
/* end confdefs.h. */
|
|
|
|
|
-#include <readline/readline.h>
|
|
|
|
|
+#include <editline/readline.h>
|
|
|
|
|
|
|
|
|
|
_ACEOF
|
|
|
|
|
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
2013-11-23 20:28:11 +00:00
|
|
|
--- setup.py.orig 2013-11-23 20:56:13.000000000 +0200
|
|
|
|
|
+++ setup.py 2013-11-23 21:10:29.000000000 +0200
|
|
|
|
|
@@ -642,7 +642,7 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
exts.append( Extension('audioop', ['audioop.c']) )
|
|
|
|
|
|
|
|
|
|
# readline
|
|
|
|
|
- do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
|
|
|
|
|
+ do_readline = self.compiler.find_library_file(lib_dirs, 'edit')
|
|
|
|
|
readline_termcap_library = ""
|
|
|
|
|
curses_library = ""
|
2012-08-13 14:42:32 +00:00
|
|
|
# Cannot use os.popen here in py3k.
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -706,7 +706,7 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
else:
|
|
|
|
|
readline_extra_link_args = ()
|
|
|
|
|
|
|
|
|
|
- readline_libs = ['readline']
|
|
|
|
|
+ readline_libs = ['edit']
|
|
|
|
|
if readline_termcap_library:
|
|
|
|
|
pass # Issue 7384: Already linked against curses or tinfo.
|
|
|
|
|
elif curses_library:
|
2013-11-23 20:28:11 +00:00
|
|
|
--- Modules/readline.c.orig 2013-11-23 20:51:46.000000000 +0200
|
|
|
|
|
+++ Modules/readline.c 2013-11-23 21:31:10.000000000 +0200
|
2012-03-06 07:40:54 +00:00
|
|
|
@@ -28,8 +28,7 @@
|
|
|
|
|
|
|
|
|
|
/* GNU readline definitions */
|
|
|
|
|
#undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */
|
|
|
|
|
-#include <readline/readline.h>
|
|
|
|
|
-#include <readline/history.h>
|
|
|
|
|
+#include <editline/readline.h>
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_RL_COMPLETION_MATCHES
|
|
|
|
|
#define completion_matches(x, y) \
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -1028,7 +1027,6 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
PyEval_SaveThread();
|
|
|
|
|
#endif
|
|
|
|
|
if (s < 0) {
|
|
|
|
|
- rl_free_line_state();
|
|
|
|
|
rl_cleanup_after_signal();
|
|
|
|
|
rl_callback_handler_remove();
|
|
|
|
|
*signal = 1;
|
2013-11-23 20:28:11 +00:00
|
|
|
@@ -1127,12 +1125,6 @@
|
2012-03-06 07:40:54 +00:00
|
|
|
const char *line;
|
|
|
|
|
int length = _py_get_history_length();
|
|
|
|
|
if (length > 0)
|
|
|
|
|
-#ifdef __APPLE__
|
|
|
|
|
- if (using_libedit_emulation) {
|
2013-11-23 20:28:11 +00:00
|
|
|
- /* handle older 0-based or newer 1-based indexing */
|
|
|
|
|
- line = (const char *)history_get(length + libedit_history_start - 1)->line;
|
2012-03-06 07:40:54 +00:00
|
|
|
- } else
|
|
|
|
|
-#endif /* __APPLE__ */
|
|
|
|
|
line = (const char *)history_get(length)->line;
|
|
|
|
|
else
|
|
|
|
|
line = "";
|