diff options
| author | Felipe Pena <felipe@php.net> | 2009-12-13 17:06:47 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2009-12-13 17:06:47 +0000 |
| commit | ef54c9c5ed30f814d072cc8bb1c95fb4515f64e9 (patch) | |
| tree | 9aac47d1f8ce5e6124ab051aec64f98fdfa6fe3d | |
| parent | 481a5d8b181f2c0c1578cb4152e8a891f3e8e5d4 (diff) | |
| download | php-git-ef54c9c5ed30f814d072cc8bb1c95fb4515f64e9.tar.gz | |
- Fixed bug #50209 (Compiling with libedit cannot find readline.h)
(patch by tcallawa at redhat dot com)
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | ext/readline/config.m4 | 2 | ||||
| -rw-r--r-- | ext/readline/readline.c | 4 | ||||
| -rw-r--r-- | sapi/cli/php_cli.c | 5 | ||||
| -rw-r--r-- | sapi/cli/php_cli_readline.c | 4 |
5 files changed, 13 insertions, 4 deletions
@@ -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 |
