diff options
author | Joe Watkins <krakjoe@php.net> | 2019-03-27 10:03:50 +0100 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2019-03-27 10:04:07 +0100 |
commit | eb405a2192bd8a0092c0795cd161d96b89f9d534 (patch) | |
tree | be8ce2766fad5cf1759bf3581538105caee642ed /sapi/phpdbg/phpdbg_cmd.c | |
parent | 1e4cff9ddb810a9038a8613719d7f91ad8bda64f (diff) | |
parent | 7af270eb284c3bd00f6e5d80fbb0a2de9f89b693 (diff) | |
download | php-git-eb405a2192bd8a0092c0795cd161d96b89f9d534.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
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 | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index 0054e90cea..e93e92190e 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -751,20 +751,15 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */ } if (buffered == NULL) { -#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT) -#define USE_LIB_STAR 1 -#else -#define USE_LIB_STAR 0 -#endif +#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; @@ -783,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); } |