--- configure.orig 2019-11-08 14:00:55.000000000 +1100 +++ configure 2019-11-08 19:37:57.000000000 +1100 @@ -15283,9 +15283,9 @@ $as_echo_n "checking how to link readline libs... " >&6; } for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do 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 @@ -15331,7 +15331,7 @@ # check for readline 2.2 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : have_readline=yes @@ -15344,7 +15344,7 @@ then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -15357,7 +15357,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -15371,13 +15371,13 @@ 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. */ @@ -15415,13 +15415,13 @@ # 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. */ @@ -15459,13 +15459,13 @@ # also in 4.0, but not in editline -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5 -$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -ledit" >&5 +$as_echo_n "checking for rl_resize_terminal in -ledit... " >&6; } if ${ac_cv_lib_readline_rl_resize_terminal+:} 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. */ @@ -15503,13 +15503,13 @@ # 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. */ @@ -15549,7 +15549,7 @@ # also in readline 4.2 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : have_readline=yes @@ -15562,7 +15562,7 @@ then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -15575,13 +15575,13 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5 -$as_echo_n "checking for append_history in -lreadline... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -ledit" >&5 +$as_echo_n "checking for append_history in -ledit... " >&6; } if ${ac_cv_lib_readline_append_history+:} 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. */ --- setup.py.orig 2019-11-08 19:39:18.000000000 +1100 +++ setup.py 2019-11-08 19:41:43.000000000 +1100 @@ -874,7 +874,7 @@ def detect_readline_curses(self): # readline - do_readline = self.compiler.find_library_file(self.lib_dirs, 'readline') + do_readline = self.compiler.find_library_file(self.lib_dirs, 'edit') readline_termcap_library = "" curses_library = "" # Cannot use os.popen here in py3k. @@ -944,7 +944,7 @@ 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: --- Modules/readline.c.orig 2019-10-15 00:34:47.000000000 +1100 +++ Modules/readline.c 2019-11-08 19:47:42.000000000 +1100 @@ -28,8 +28,7 @@ /* GNU readline definitions */ #undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */ -#include -#include +#include #ifdef HAVE_RL_COMPLETION_MATCHES #define completion_matches(x, y) \