]> granicus.if.org Git - php/commitdiff
- Fixed bug #50209 (Compiling with libedit cannot find readline.h)
authorFelipe Pena <felipe@php.net>
Sun, 13 Dec 2009 17:06:47 +0000 (17:06 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 13 Dec 2009 17:06:47 +0000 (17:06 +0000)
  (patch by tcallawa at redhat dot com)

NEWS
ext/readline/config.m4
ext/readline/readline.c
sapi/cli/php_cli.c
sapi/cli/php_cli_readline.c

diff --git a/NEWS b/NEWS
index 83b236178b56b999269b9e9d0ba0e29cce12e8c9..ad2ce231d5c8d8ee503bc1083caf106726d6b625 100644 (file)
--- 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)
index a320deeb4299dfa124b49e4d20f04423282c33f6..a99262a659a634cf6272635c8cae25c1a10fe549 100644 (file)
@@ -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
index f27ce606ac0dd4b8ca4fd8c60f36ab77e07a61e6..22cc8ae1e3012baf64fc45af09633dd5ffff5c93 100644 (file)
 #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
 
index c4474d4c4e7015a4e41a7d7153a2be186c8cf1e8..d5878a54e7dd0d8d3fc679adc9306712e1dc26ee 100644 (file)
 #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"
index 22327a2b921776f64675ad2056533f7fbd83c54c..c26e8cfcacb113a0f422727d5b984902f377bf08 100644 (file)
 #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