]> granicus.if.org Git - php/commitdiff
Fix [-Wundef] warning in CLI SAPI
authorGeorge Peter Banyard <girgias@php.net>
Tue, 12 May 2020 15:54:02 +0000 (17:54 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Tue, 12 May 2020 20:02:12 +0000 (22:02 +0200)
sapi/cli/php_cli.c
sapi/cli/php_http_parser.c

index d80b2fb95b676f4522538f60928cb1437a6ad4ca..a5fafda4f1d3d8ad3f8d24bfeb0bc9aa1aeec92c 100644 (file)
@@ -489,7 +489,7 @@ static void php_cli_usage(char *argv0)
                                "   %s [options] -- [args...]\n"
                                "   %s [options] -a\n"
                                "\n"
-#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
+#if (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)) && !defined(COMPILE_DL_READLINE)
                                "  -a               Run as interactive shell\n"
 #else
                                "  -a               Run interactively\n"
@@ -641,7 +641,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
                        case 'v': /* show php version & quit */
                                php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) The PHP Group\n%s",
                                        PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
-#if ZTS
+#ifdef ZTS
                                        "ZTS "
 #else
                                        "NTS "
@@ -871,7 +871,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
 #endif
 
                if (interactive) {
-#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
+#if (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)) && !defined(COMPILE_DL_READLINE)
                        printf("Interactive shell\n\n");
 #else
                        printf("Interactive mode enabled\n\n");
index 63769c15acfa9be419d6363b2d5419f95c9016a1..6d764b6c0dff07e08109e4350fa4e4c899ca27ee 100644 (file)
@@ -244,7 +244,7 @@ enum flags
 #define start_state (parser->type == PHP_HTTP_REQUEST ? s_start_req : s_start_res)
 
 
-#if HTTP_PARSER_STRICT
+#ifdef HTTP_PARSER_STRICT
 # define STRICT_CHECK(cond) if (cond) goto error
 # define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead)
 #else