Skip to content

Commit 56698af

Browse files
committed
Fix [-Wundef] warning in CLI SAPI
1 parent f87743d commit 56698af

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sapi/cli/php_cli.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ static void php_cli_usage(char *argv0)
489489
" %s [options] -- [args...]\n"
490490
" %s [options] -a\n"
491491
"\n"
492-
#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
492+
#if (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)) && !defined(COMPILE_DL_READLINE)
493493
" -a Run as interactive shell\n"
494494
#else
495495
" -a Run interactively\n"
@@ -641,7 +641,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
641641
case 'v': /* show php version & quit */
642642
php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) The PHP Group\n%s",
643643
PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
644-
#if ZTS
644+
#ifdef ZTS
645645
"ZTS "
646646
#else
647647
"NTS "
@@ -871,7 +871,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
871871
#endif
872872

873873
if (interactive) {
874-
#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
874+
#if (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)) && !defined(COMPILE_DL_READLINE)
875875
printf("Interactive shell\n\n");
876876
#else
877877
printf("Interactive mode enabled\n\n");

sapi/cli/php_http_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ enum flags
244244
#define start_state (parser->type == PHP_HTTP_REQUEST ? s_start_req : s_start_res)
245245

246246

247-
#if HTTP_PARSER_STRICT
247+
#ifdef HTTP_PARSER_STRICT
248248
# define STRICT_CHECK(cond) if (cond) goto error
249249
# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead)
250250
#else

0 commit comments

Comments
 (0)