]> granicus.if.org Git - php/commitdiff
fix constant defined undefined behavior warning
authordcarlier <devnexen@gmail.com>
Fri, 24 Nov 2017 14:52:53 +0000 (14:52 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 24 Nov 2017 18:01:46 +0000 (19:01 +0100)
sapi/phpdbg/phpdbg_cmd.c

index 8841cc86dcb8741338a2a35bd55a631970346a65..6bd6faf34d3cb28d63841d2b000e59c5bef0bc61 100644 (file)
@@ -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))