diff options
author | Joe Watkins <krakjoe@php.net> | 2019-03-27 09:58:40 +0100 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2019-03-27 10:02:42 +0100 |
commit | 7af270eb284c3bd00f6e5d80fbb0a2de9f89b693 (patch) | |
tree | 722eeb524a33f555a4571aa0c65fa020ac9f3056 /sapi/phpdbg/phpdbg_cmd.c | |
parent | 6d3a2b46930057524c1eebfa574a4869e3f9dd28 (diff) | |
download | php-git-7af270eb284c3bd00f6e5d80fbb0a2de9f89b693.tar.gz |
Fix #77805 phpdbg build fails when readline is shared
Diffstat (limited to 'sapi/phpdbg/phpdbg_cmd.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_cmd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index b4a878818b..e93e92190e 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -751,16 +751,15 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */ } if (buffered == NULL) { -#define USE_LIB_STAR (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)) +#ifdef HAVE_PHPDBG_READLINE /* note: EOF makes readline write prompt again in local console mode - and ignored if compiled without readline */ -#if USE_LIB_STAR if ((PHPDBG_G(flags) & PHPDBG_IS_REMOTE) || !isatty(PHPDBG_G(io)[PHPDBG_STDIN].fd)) #endif { phpdbg_write("prompt", "", "%s", phpdbg_get_prompt()); phpdbg_consume_stdin_line(cmd = buf); } -#if USE_LIB_STAR +#ifdef HAVE_PHPDBG_READLINE else { cmd = readline(phpdbg_get_prompt()); PHPDBG_G(last_was_newline) = 1; @@ -779,7 +778,7 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */ buffer = estrdup(cmd); -#if USE_LIB_STAR +#ifdef HAVE_PHPDBG_READLINE if (!buffered && cmd && !(PHPDBG_G(flags) & PHPDBG_IS_REMOTE) && isatty(PHPDBG_G(io)[PHPDBG_STDIN].fd)) { free(cmd); } |