Skip to content

Commit f8300e5

Browse files
committed
Sync #if/ifdef/defined (-Wundef)
The following macros are either defined (to 1) or undefined: * HAVE_CLOCK_GETTIME_NSEC_NP * HAVE_SYS_POLL_H * HAVE_SYS_WAIT_H * HAVE_TZSET * HAVE_WIFCONTINUED
1 parent ecb2c73 commit f8300e5

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

Zend/zend_hrtime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#elif defined(_WIN32) || defined(_WIN64)
4343
# undef ZEND_HRTIME_PLATFORM_WINDOWS
4444
# define ZEND_HRTIME_PLATFORM_WINDOWS 1
45-
#elif HAVE_CLOCK_GETTIME_NSEC_NP
45+
#elif defined(HAVE_CLOCK_GETTIME_NSEC_NP)
4646
# undef ZEND_HRTIME_PLATFORM_APPLE_GETTIME_NSEC
4747
# define ZEND_HRTIME_PLATFORM_APPLE_GETTIME_NSEC 1
4848
#elif defined(__APPLE__)

ext/pcntl/php_pcntl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "pcntl_decl.h"
1919

20-
#if defined(HAVE_DECL_WCONTINUED) && HAVE_DECL_WCONTINUED == 1 && defined(HAVE_WIFCONTINUED) && HAVE_WIFCONTINUED == 1
20+
#if defined(HAVE_DECL_WCONTINUED) && HAVE_DECL_WCONTINUED == 1 && defined(HAVE_WIFCONTINUED)
2121
#define HAVE_WCONTINUED 1
2222
#endif
2323

ext/standard/proc_open.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static void proc_open_rsrc_dtor(zend_resource *rsrc)
266266
php_process_handle *proc = (php_process_handle*)rsrc->ptr;
267267
#ifdef PHP_WIN32
268268
DWORD wstatus;
269-
#elif HAVE_SYS_WAIT_H
269+
#elif defined(HAVE_SYS_WAIT_H)
270270
int wstatus;
271271
int waitpid_options = 0;
272272
pid_t wait_pid;
@@ -297,7 +297,7 @@ static void proc_open_rsrc_dtor(zend_resource *rsrc)
297297
}
298298
CloseHandle(proc->childHandle);
299299

300-
#elif HAVE_SYS_WAIT_H
300+
#elif defined(HAVE_SYS_WAIT_H)
301301
if (!FG(pclose_wait)) {
302302
waitpid_options = WNOHANG;
303303
}
@@ -389,7 +389,7 @@ PHP_FUNCTION(proc_get_status)
389389
php_process_handle *proc;
390390
#ifdef PHP_WIN32
391391
DWORD wstatus;
392-
#elif HAVE_SYS_WAIT_H
392+
#elif defined(HAVE_SYS_WAIT_H)
393393
int wstatus;
394394
pid_t wait_pid;
395395
#endif
@@ -418,7 +418,7 @@ PHP_FUNCTION(proc_get_status)
418418
* even if the child has already exited. This is because the result stays available
419419
* until the child handle is closed. Hence no caching is used on Windows. */
420420
add_assoc_bool(return_value, "cached", false);
421-
#elif HAVE_SYS_WAIT_H
421+
#elif defined(HAVE_SYS_WAIT_H)
422422
wait_pid = waitpid_cached(proc, &wstatus, WNOHANG|WUNTRACED);
423423

424424
if (wait_pid == proc->child) {

main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,7 @@ zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additi
22642264
zend_reset_lc_ctype_locale();
22652265
zend_update_current_locale();
22662266

2267-
#if HAVE_TZSET
2267+
#ifdef HAVE_TZSET
22682268
tzset();
22692269
#endif
22702270

main/network.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#endif
4545
#ifdef HAVE_POLL_H
4646
#include <poll.h>
47-
#elif HAVE_SYS_POLL_H
47+
#elif defined(HAVE_SYS_POLL_H)
4848
#include <sys/poll.h>
4949
#endif
5050

0 commit comments

Comments
 (0)