summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2014-06-23 10:17:43 +0200
committerRemi Collet <remi@php.net>2014-06-23 10:17:43 +0200
commit98d41dfc9db53e2ecf5a244acf00be617ce49002 (patch)
treebd0caa69a7aa0ba879545d05e6d9acc6709432f4
parent86bafec836b81070547399b890c5b01897250a31 (diff)
downloadphp-git-98d41dfc9db53e2ecf5a244acf00be617ce49002.tar.gz
Better fix for phpdbg + libedit
- fix include - disable coloured prompt only with libedit
-rw-r--r--sapi/phpdbg/phpdbg.h5
-rw-r--r--sapi/phpdbg/phpdbg_utils.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h
index b2e7a03c21..eb4faf1f94 100644
--- a/sapi/phpdbg/phpdbg.h
+++ b/sapi/phpdbg/phpdbg.h
@@ -64,10 +64,13 @@
# include "TSRM.h"
#endif
-#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
+#ifdef LIBREADLINE
# include <readline/readline.h>
# include <readline/history.h>
#endif
+#ifdef HAVE_LIBEDIT
+# include <editline/readline.h>
+#endif
#include "phpdbg_lexer.h"
#include "phpdbg_cmd.h"
diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c
index 3b4eac7327..3ce2fade17 100644
--- a/sapi/phpdbg/phpdbg_utils.c
+++ b/sapi/phpdbg/phpdbg_utils.c
@@ -400,7 +400,7 @@ PHPDBG_API const char *phpdbg_get_prompt(TSRMLS_D) /* {{{ */
}
/* create cached prompt */
-#ifdef HAVE_LIBREADLINE
+#ifndef HAVE_LIBEDIT
/* TODO: libedit doesn't seems to support coloured prompt */
if ((PHPDBG_G(flags) & PHPDBG_IS_COLOURED)) {
asprintf(