]> granicus.if.org Git - php/commitdiff
Better fix for phpdbg + libedit
authorRemi Collet <remi@php.net>
Mon, 23 Jun 2014 08:17:43 +0000 (10:17 +0200)
committerRemi Collet <remi@php.net>
Mon, 23 Jun 2014 08:17:43 +0000 (10:17 +0200)
- fix include
- disable coloured prompt only with libedit

sapi/phpdbg/phpdbg.h
sapi/phpdbg/phpdbg_utils.c

index b2e7a03c213e836731b5fc0dd77815519dc47905..eb4faf1f94282b28df13796556fe1d3fe115cdd2 100644 (file)
 # 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"
index 3b4eac73279c6bb484af70ca984026b2fc12b1c6..3ce2fade17de7ad2435b76fdcbb7e33c8732678c 100644 (file)
@@ -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(