From c980529c281ad67b9f08348f1dc3446d015a2590 Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Fri, 29 Sep 2023 10:55:53 -0400 Subject: [PATCH] =?UTF-8?q?3.x:=20don=E2=80=99t=20include=20editline/readl?= =?UTF-8?q?ine.h,=20use=20the=20embedded=20readline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building for a Python whose own readline module has been configured to use editline, WITH_EDITLINE will be defined during the python-gnureadline build, by virtue of its inclusion of "pyconfig.h" (via "Python.h"). This macro being defined caused python-gnureadline to a problem because python-gnureadline is expecting and has configured itself to use its own embedded copy of GNU readline. This removes the HAVE_EDITLINE branch to allow the expected readline headers to be included. See https://trac.macports.org/ticket/68265. --- Modules/3.x/readline.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git Modules/3.x/readline.c Modules/3.x/readline.c index fa8cf6f32b10..f35ce10c2406 100644 --- Modules/3.x/readline.c +++ Modules/3.x/readline.c @@ -28,14 +28,10 @@ # define RESTORE_LOCALE(sl) #endif -#ifdef WITH_EDITLINE -# include -#else /* GNU readline definitions */ -# undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */ -# include -# include -#endif +#undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */ +#include +#include #ifdef HAVE_RL_COMPLETION_MATCHES #define completion_matches(x, y) \ -- 2.42.0