mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Sync #if/ifdef/defined (#14508)
This syncs CPP macro conditions: - _WIN32 - _WIN64 - HAVE_ALLOCA_H - HAVE_ALPHASORT - HAVE_ARPA_INET_H - HAVE_CONFIG_H - HAVE_DIRENT_H - HAVE_DLFCN_H - HAVE_GETTIMEOFDAY - HAVE_LIBDL - HAVE_POLL_H - HAVE_PWD_H - HAVE_SCANDIR - HAVE_SYS_FILE_H - HAVE_SYS_PARAM_H - HAVE_SYS_SOCKET_H - HAVE_SYS_TIME_H - HAVE_SYS_TYPES_H - HAVE_SYS_WAIT_H - HAVE_UNISTD_H - PHP_WIN32 - ZEND_WIN32 These are either undefined or defined to 1 in Autotools and Windows. Follow up of GH-5526 (-Wundef).
This commit is contained in:
parent
52f6e099b0
commit
84a0da1574
32 changed files with 76 additions and 80 deletions
|
@ -36,17 +36,17 @@
|
|||
#include <unixlib/local.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_TIME_H
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
#include <locale.h>
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
|
@ -222,7 +222,7 @@ static const php_cli_server_http_response_status_code_pair template_map[] = {
|
|||
|
||||
static int php_cli_server_log_level = 3;
|
||||
|
||||
#if HAVE_UNISTD_H || defined(PHP_WIN32)
|
||||
#if defined(HAVE_UNISTD_H) || defined(PHP_WIN32)
|
||||
static int php_cli_output_is_tty = OUTPUT_NOT_CHECKED;
|
||||
#endif
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ static bool php_cli_server_content_sender_pull(php_cli_server_content_sender *se
|
|||
return true;
|
||||
} /* }}} */
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
static int php_cli_is_output_tty(void) /* {{{ */
|
||||
{
|
||||
if (php_cli_output_is_tty == OUTPUT_NOT_CHECKED) {
|
||||
|
@ -1199,7 +1199,7 @@ static void php_cli_server_log_response(php_cli_server_client *client, int statu
|
|||
}
|
||||
}
|
||||
|
||||
#if HAVE_UNISTD_H || defined(PHP_WIN32)
|
||||
#if defined(HAVE_UNISTD_H) || defined(PHP_WIN32)
|
||||
if (CLI_SERVER_G(color) && php_cli_is_output_tty() == OUTPUT_IS_TTY) {
|
||||
if (effective_status >= 500) {
|
||||
/* server error: red */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue