Skip to content

Commit f87743d

Browse files
committed
Fix [-Wundef] warning in FPM SAPI
1 parent 25acc4a commit f87743d

File tree

10 files changed

+27
-27
lines changed

10 files changed

+27
-27
lines changed

sapi/fpm/fpm/events/devpoll.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_DEVPOLL
22+
#ifdef HAVE_DEVPOLL
2323

2424
#include <sys/types.h>
2525
#include <sys/stat.h>
@@ -53,15 +53,15 @@ static int npollfds = 0;
5353

5454
struct fpm_event_module_s *fpm_event_devpoll_module() /* {{{ */
5555
{
56-
#if HAVE_DEVPOLL
56+
#ifdef HAVE_DEVPOLL
5757
return &devpoll_module;
5858
#else
5959
return NULL;
6060
#endif /* HAVE_DEVPOLL */
6161
}
6262
/* }}} */
6363

64-
#if HAVE_DEVPOLL
64+
#ifdef HAVE_DEVPOLL
6565

6666
/*
6767
* Init module

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/kqueue.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_KQUEUE
22+
#ifdef HAVE_KQUEUE
2323

2424
#include <sys/types.h>
2525
#include <sys/event.h>
@@ -54,15 +54,15 @@ static int kfd = 0;
5454
*/
5555
struct fpm_event_module_s *fpm_event_kqueue_module() /* {{{ */
5656
{
57-
#if HAVE_KQUEUE
57+
#ifdef HAVE_KQUEUE
5858
return &kqueue_module;
5959
#else
6060
return NULL;
6161
#endif /* HAVE_KQUEUE */
6262
}
6363
/* }}} */
6464

65-
#if HAVE_KQUEUE
65+
#ifdef HAVE_KQUEUE
6666

6767
/*
6868
* init kqueue and stuff

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/port.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_PORT
22+
#ifdef HAVE_PORT
2323

2424
#include <port.h>
2525
#include <poll.h>
@@ -49,15 +49,15 @@ static int pfd = -1;
4949

5050
struct fpm_event_module_s *fpm_event_port_module() /* {{{ */
5151
{
52-
#if HAVE_PORT
52+
#ifdef HAVE_PORT
5353
return &port_module;
5454
#else
5555
return NULL;
5656
#endif /* HAVE_PORT */
5757
}
5858
/* }}} */
5959

60-
#if HAVE_PORT
60+
#ifdef HAVE_PORT
6161

6262
/*
6363
* 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.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/*
1515
On FreeBSD and OpenBSD, backlog negative values are truncated to SOMAXCONN
1616
*/
17-
#if (__FreeBSD__) || (__OpenBSD__)
17+
#if defined(__FreeBSD__) || defined(__OpenBSD__)
1818
#define FPM_BACKLOG_DEFAULT -1
1919
#else
2020
#define FPM_BACKLOG_DEFAULT 511

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)