Skip to content

Commit 98d41df

Browse files
committed
Better fix for phpdbg + libedit
- fix include - disable coloured prompt only with libedit
1 parent 86bafec commit 98d41df

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

sapi/phpdbg/phpdbg.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,13 @@
6464
# include "TSRM.h"
6565
#endif
6666

67-
#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
67+
#ifdef LIBREADLINE
6868
# include <readline/readline.h>
6969
# include <readline/history.h>
7070
#endif
71+
#ifdef HAVE_LIBEDIT
72+
# include <editline/readline.h>
73+
#endif
7174

7275
#include "phpdbg_lexer.h"
7376
#include "phpdbg_cmd.h"

sapi/phpdbg/phpdbg_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ PHPDBG_API const char *phpdbg_get_prompt(TSRMLS_D) /* {{{ */
400400
}
401401

402402
/* create cached prompt */
403-
#ifdef HAVE_LIBREADLINE
403+
#ifndef HAVE_LIBEDIT
404404
/* TODO: libedit doesn't seems to support coloured prompt */
405405
if ((PHPDBG_G(flags) & PHPDBG_IS_COLOURED)) {
406406
asprintf(

0 commit comments

Comments
 (0)