summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_cmd.c
diff options
context:
space:
mode:
authordcarlier <devnexen@gmail.com>2017-11-24 14:52:53 +0000
committerNikita Popov <nikita.ppv@gmail.com>2017-11-24 19:01:46 +0100
commit287a2b018402d814fb8b3ee7dd6192491c3adb22 (patch)
tree6fd1a62f1aaa061c48fd587a9d87a922ac1c4d3e /sapi/phpdbg/phpdbg_cmd.c
parenta84c7050fd7ee9e737c7cfe5b2405f939d32a291 (diff)
downloadphp-git-287a2b018402d814fb8b3ee7dd6192491c3adb22.tar.gz
fix constant defined undefined behavior warning
Diffstat (limited to 'sapi/phpdbg/phpdbg_cmd.c')
-rw-r--r--sapi/phpdbg/phpdbg_cmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c
index 8841cc86dc..6bd6faf34d 100644
--- a/sapi/phpdbg/phpdbg_cmd.c
+++ b/sapi/phpdbg/phpdbg_cmd.c
@@ -751,7 +751,11 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
}
if (buffered == NULL) {
-#define USE_LIB_STAR (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT))
+#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
+#define USE_LIB_STAR 1
+#else
+#define USE_LIB_STAR 0
+#endif
/* 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))