Skip to content

Commit c865350

Browse files
committed
Fix -Wundef in FPM
1 parent c10f145 commit c865350

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

sapi/fpm/fpm/events/epoll.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "../fpm.h"
2020
#include "../zlog.h"
2121

22-
#if HAVE_EPOLL
22+
#ifdef HAVE_EPOLL
2323

2424
#include <sys/epoll.h>
2525
#include <errno.h>
@@ -48,15 +48,15 @@ static int epollfd = -1;
4848

4949
struct fpm_event_module_s *fpm_event_epoll_module() /* {{{ */
5050
{
51-
#if HAVE_EPOLL
51+
#ifdef HAVE_EPOLL
5252
return &epoll_module;
5353
#else
5454
return NULL;
5555
#endif /* HAVE_EPOLL */
5656
}
5757
/* }}} */
5858

59-
#if HAVE_EPOLL
59+
#ifdef HAVE_EPOLL
6060

6161
/*
6262
* Init the module

sapi/fpm/fpm/events/poll.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "../fpm.h"
2020
#include "../zlog.h"
2121

22-
#if HAVE_POLL
22+
#ifdef HAVE_POLL
2323

2424
#include <poll.h>
2525
#include <errno.h>
@@ -52,15 +52,15 @@ static int next_free_slot = 0;
5252
*/
5353
struct fpm_event_module_s *fpm_event_poll_module() /* {{{ */
5454
{
55-
#if HAVE_POLL
55+
#ifdef HAVE_POLL
5656
return &poll_module;
5757
#else
5858
return NULL;
5959
#endif /* HAVE_POLL */
6060
}
6161
/* }}} */
6262

63-
#if HAVE_POLL
63+
#ifdef HAVE_POLL
6464

6565
/*
6666
* Init the module

sapi/fpm/fpm/events/select.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "../fpm.h"
2020
#include "../zlog.h"
2121

22-
#if HAVE_SELECT
22+
#ifdef HAVE_SELECT
2323

2424
/* According to POSIX.1-2001 */
2525
#include <sys/select.h>
@@ -55,15 +55,15 @@ static fd_set fds;
5555
*/
5656
struct fpm_event_module_s *fpm_event_select_module() /* {{{ */
5757
{
58-
#if HAVE_SELECT
58+
#ifdef HAVE_SELECT
5959
return &select_module;
6060
#else
6161
return NULL;
6262
#endif /* HAVE_SELECT */
6363
}
6464
/* }}} */
6565

66-
#if HAVE_SELECT
66+
#ifdef HAVE_SELECT
6767

6868
/*
6969
* Init the module

sapi/fpm/fpm/fpm_clock.c

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

33
#include "fpm_config.h"
44

5-
#if defined(HAVE_CLOCK_GETTIME)
5+
#ifdef HAVE_CLOCK_GETTIME
66
#include <time.h> /* for CLOCK_MONOTONIC */
77
#endif
88

sapi/fpm/fpm/fpm_main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,27 @@
3333
#include <stdio.h>
3434
#include "php.h"
3535

36-
#if HAVE_SYS_TIME_H
36+
#ifdef HAVE_SYS_TIME_H
3737
# include <sys/time.h>
3838
#endif
3939

40-
#if HAVE_UNISTD_H
40+
#ifdef HAVE_UNISTD_H
4141
# include <unistd.h>
4242
#endif
4343

4444
#include <signal.h>
4545

4646
#include <locale.h>
4747

48-
#if HAVE_SYS_TYPES_H
48+
#ifdef HAVE_SYS_TYPES_H
4949
# include <sys/types.h>
5050
#endif
5151

52-
#if HAVE_SYS_WAIT_H
52+
#ifdef HAVE_SYS_WAIT_H
5353
# include <sys/wait.h>
5454
#endif
5555

56-
#if HAVE_FCNTL_H
56+
#ifdef HAVE_FCNTL_H
5757
# include <fcntl.h>
5858
#endif
5959

@@ -1807,7 +1807,7 @@ consult the installation file that came with this distribution, or visit \n\
18071807
<a href=\"http://php.net/install.windows\">the manual page</a>.</p>\n");
18081808
} zend_catch {
18091809
} zend_end_try();
1810-
#if defined(ZTS) && !defined(PHP_DEBUG)
1810+
#if defined(ZTS) && !PHP_DEBUG
18111811
/* XXX we're crashing here in msvc6 debug builds at
18121812
* php_message_handler_for_zend:839 because
18131813
* SG(request_info).path_translated is an invalid pointer.

sapi/fpm/fpm/fpm_sockets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ int fpm_sockets_init_main() /* {{{ */
474474
}
475475
/* }}} */
476476

477-
#ifdef HAVE_FPM_LQ
477+
#if HAVE_FPM_LQ
478478

479479
#ifdef HAVE_LQ_TCP_INFO
480480

sapi/fpm/fpm/fpm_stdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static inline int fpm_use_error_log() { /* {{{ */
4949
* - SysV init launch php-fpm as a daemon
5050
* - Systemd launch php-fpm in foreground
5151
*/
52-
#if HAVE_UNISTD_H
52+
#ifdef HAVE_UNISTD_H
5353
if (fpm_global_config.daemonize || (!isatty(STDERR_FILENO) && !fpm_globals.force_stderr)) {
5454
#else
5555
if (fpm_global_config.daemonize) {

0 commit comments

Comments
 (0)