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:
Peter Kokot 2024-06-09 14:23:41 +02:00 committed by GitHub
parent 52f6e099b0
commit 84a0da1574
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 76 additions and 80 deletions

View file

@ -122,11 +122,11 @@ typedef int pid_t;
#include <unix.h>
#endif
#if HAVE_ALLOCA_H
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#if HAVE_BUILD_DEFS_H
#ifdef HAVE_BUILD_DEFS_H
#include <build-defs.h>
#endif
@ -209,7 +209,7 @@ typedef unsigned int socklen_t;
#include <stdlib.h>
#include <ctype.h>
#if HAVE_UNISTD_H
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@ -220,7 +220,7 @@ typedef unsigned int socklen_t;
#include "zend_stack.h"
#include <string.h>
#if HAVE_PWD_H
#ifdef HAVE_PWD_H
# ifdef PHP_WIN32
#include "win32/param.h"
# else