Fix [-Wundef] warning in CLI SAPI

This commit is contained in:
George Peter Banyard 2020-05-12 17:54:02 +02:00
parent f87743de9f
commit 56698afb6d
2 changed files with 4 additions and 4 deletions

View file

@ -489,7 +489,7 @@ static void php_cli_usage(char *argv0)
" %s [options] -- [args...]\n" " %s [options] -- [args...]\n"
" %s [options] -a\n" " %s [options] -a\n"
"\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" " -a Run as interactive shell\n"
#else #else
" -a Run interactively\n" " -a Run interactively\n"
@ -641,7 +641,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
case 'v': /* show php version & quit */ case 'v': /* show php version & quit */
php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) The PHP Group\n%s", php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) The PHP Group\n%s",
PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__, PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
#if ZTS #ifdef ZTS
"ZTS " "ZTS "
#else #else
"NTS " "NTS "
@ -871,7 +871,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
#endif #endif
if (interactive) { 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"); printf("Interactive shell\n\n");
#else #else
printf("Interactive mode enabled\n\n"); printf("Interactive mode enabled\n\n");

View file

@ -244,7 +244,7 @@ enum flags
#define start_state (parser->type == PHP_HTTP_REQUEST ? s_start_req : s_start_res) #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 STRICT_CHECK(cond) if (cond) goto error
# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead) # define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead)
#else #else