summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-12-13 17:06:47 +0000
committerFelipe Pena <felipe@php.net>2009-12-13 17:06:47 +0000
commitef54c9c5ed30f814d072cc8bb1c95fb4515f64e9 (patch)
tree9aac47d1f8ce5e6124ab051aec64f98fdfa6fe3d
parent481a5d8b181f2c0c1578cb4152e8a891f3e8e5d4 (diff)
downloadphp-git-ef54c9c5ed30f814d072cc8bb1c95fb4515f64e9.tar.gz
- Fixed bug #50209 (Compiling with libedit cannot find readline.h)
(patch by tcallawa at redhat dot com)
-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.c5
-rw-r--r--sapi/cli/php_cli_readline.c4
5 files changed, 13 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 9c4a3f8fff..655cd4eae6 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ PHP NEWS
- Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN).
(Ilia, Pierrick)
- Fixed bug #50266 (conflicting types for llabs). (Jani)
+- Fixed bug #50209 (Compiling with libedit cannot find readline.h).
+ (tcallawa at redhat dot com)
- Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
non-existent file). (Dmitry)
- Fixed bug #50162 (Memory leak when fetching timestamp column from Oracle
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 c6f5e18c81..4c8373f3d4 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 1545dabe03..fe33cea010 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -76,8 +76,11 @@
#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 64543fcbdd..6098f975f5 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