summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--ext/readline/config.m42
-rw-r--r--ext/readline/readline.c4
-rw-r--r--sapi/cli/php_cli.c4
-rw-r--r--sapi/cli/php_cli_readline.c4
5 files changed, 12 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 83b236178b..ad2ce231d5 100644
--- a/NEWS
+++ b/NEWS
@@ -62,6 +62,8 @@ PHP NEWS
(Pierrick)
- Fixed bug #50212 (crash by ldap_get_option() with LDAP_OPT_NETWORK_TIMEOUT).
(Ilia, shigeru_kitazaki at cybozu dot co dot jp)
+- Fixed bug #50209 (Compiling with libedit cannot find readline.h).
+ (tcallawa at redhat dot com)
- Fixed bug #50207 (segmentation fault when concatenating very large strings on
64bit linux). (Ilia)
- Fixed bug #50195 (pg_copy_to() fails when table name contains schema. (Ilia)
diff --git a/ext/readline/config.m4 b/ext/readline/config.m4
index a320deeb42..a99262a659 100644
--- a/ext/readline/config.m4
+++ b/ext/readline/config.m4
@@ -65,7 +65,7 @@ if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
elif test "$PHP_LIBEDIT" != "no"; then
for i in $PHP_LIBEDIT /usr/local /usr; do
- test -f $i/include/readline/readline.h && LIBEDIT_DIR=$i && break
+ test -f $i/include/editline/readline.h && LIBEDIT_DIR=$i && break
done
if test -z "$LIBEDIT_DIR"; then
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index f27ce606ac..22cc8ae1e3 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -33,8 +33,10 @@
#define rl_completion_matches completion_matches
#endif
+#ifdef HAVE_LIBEDIT
+#include <editline/readline.h>
+#else
#include <readline/readline.h>
-#ifndef HAVE_LIBEDIT
#include <readline/history.h>
#endif
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index c4474d4c4e..d5878a54e7 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -76,8 +76,10 @@
#endif
#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
+#if HAVE_LIBEDIT
+#include <editline/readline.h>
+#else
#include <readline/readline.h>
-#if !HAVE_LIBEDIT
#include <readline/history.h>
#endif
#include "php_cli_readline.h"
diff --git a/sapi/cli/php_cli_readline.c b/sapi/cli/php_cli_readline.c
index 22327a2b92..c26e8cfcac 100644
--- a/sapi/cli/php_cli_readline.c
+++ b/sapi/cli/php_cli_readline.c
@@ -49,8 +49,10 @@
#include <unixlib/local.h>
#endif
+#if HAVE_LIBEDIT
+#include <editline/readline.h>
+#else
#include <readline/readline.h>
-#if !HAVE_LIBEDIT
#include <readline/history.h>
#endif