summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-05-12 17:53:41 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-05-12 22:02:03 +0200
commitf87743de9fc07084b8fec6e3a0a8f628ee6fa372 (patch)
tree2f86853e2f96869a34fecf45cdf419eee924c0b5
parent25acc4a6b4bca5d49de7b97fad4afac37de5b751 (diff)
downloadphp-git-f87743de9fc07084b8fec6e3a0a8f628ee6fa372.tar.gz
Fix [-Wundef] warning in FPM SAPI
-rw-r--r--sapi/fpm/fpm/events/devpoll.c6
-rw-r--r--sapi/fpm/fpm/events/epoll.c6
-rw-r--r--sapi/fpm/fpm/events/kqueue.c6
-rw-r--r--sapi/fpm/fpm/events/poll.c6
-rw-r--r--sapi/fpm/fpm/events/port.c6
-rw-r--r--sapi/fpm/fpm/events/select.c6
-rw-r--r--sapi/fpm/fpm/fpm_clock.c2
-rw-r--r--sapi/fpm/fpm/fpm_main.c12
-rw-r--r--sapi/fpm/fpm/fpm_sockets.h2
-rw-r--r--sapi/fpm/fpm/fpm_stdio.c2
10 files changed, 27 insertions, 27 deletions
diff --git a/sapi/fpm/fpm/events/devpoll.c b/sapi/fpm/fpm/events/devpoll.c
index 15afb2beda..0d165fe2fc 100644
--- a/sapi/fpm/fpm/events/devpoll.c
+++ b/sapi/fpm/fpm/events/devpoll.c
@@ -19,7 +19,7 @@
#include "../fpm.h"
#include "../zlog.h"
-#if HAVE_DEVPOLL
+#ifdef HAVE_DEVPOLL
#include <sys/types.h>
#include <sys/stat.h>
@@ -53,7 +53,7 @@ static int npollfds = 0;
struct fpm_event_module_s *fpm_event_devpoll_module() /* {{{ */
{
-#if HAVE_DEVPOLL
+#ifdef HAVE_DEVPOLL
return &devpoll_module;
#else
return NULL;
@@ -61,7 +61,7 @@ struct fpm_event_module_s *fpm_event_devpoll_module() /* {{{ */
}
/* }}} */
-#if HAVE_DEVPOLL
+#ifdef HAVE_DEVPOLL
/*
* Init module
diff --git a/sapi/fpm/fpm/events/epoll.c b/sapi/fpm/fpm/events/epoll.c
index b81c7fa59c..9973ac0ddc 100644
--- a/sapi/fpm/fpm/events/epoll.c
+++ b/sapi/fpm/fpm/events/epoll.c
@@ -19,7 +19,7 @@
#include "../fpm.h"
#include "../zlog.h"
-#if HAVE_EPOLL
+#ifdef HAVE_EPOLL
#include <sys/epoll.h>
#include <errno.h>
@@ -48,7 +48,7 @@ static int epollfd = -1;
struct fpm_event_module_s *fpm_event_epoll_module() /* {{{ */
{
-#if HAVE_EPOLL
+#ifdef HAVE_EPOLL
return &epoll_module;
#else
return NULL;
@@ -56,7 +56,7 @@ struct fpm_event_module_s *fpm_event_epoll_module() /* {{{ */
}
/* }}} */
-#if HAVE_EPOLL
+#ifdef HAVE_EPOLL
/*
* Init the module
diff --git a/sapi/fpm/fpm/events/kqueue.c b/sapi/fpm/fpm/events/kqueue.c
index 42d70ecd6c..69a3f24057 100644
--- a/sapi/fpm/fpm/events/kqueue.c
+++ b/sapi/fpm/fpm/events/kqueue.c
@@ -19,7 +19,7 @@
#include "../fpm.h"
#include "../zlog.h"
-#if HAVE_KQUEUE
+#ifdef HAVE_KQUEUE
#include <sys/types.h>
#include <sys/event.h>
@@ -54,7 +54,7 @@ static int kfd = 0;
*/
struct fpm_event_module_s *fpm_event_kqueue_module() /* {{{ */
{
-#if HAVE_KQUEUE
+#ifdef HAVE_KQUEUE
return &kqueue_module;
#else
return NULL;
@@ -62,7 +62,7 @@ struct fpm_event_module_s *fpm_event_kqueue_module() /* {{{ */
}
/* }}} */
-#if HAVE_KQUEUE
+#ifdef HAVE_KQUEUE
/*
* init kqueue and stuff
diff --git a/sapi/fpm/fpm/events/poll.c b/sapi/fpm/fpm/events/poll.c
index ad18d0bdea..0363c2ece1 100644
--- a/sapi/fpm/fpm/events/poll.c
+++ b/sapi/fpm/fpm/events/poll.c
@@ -19,7 +19,7 @@
#include "../fpm.h"
#include "../zlog.h"
-#if HAVE_POLL
+#ifdef HAVE_POLL
#include <poll.h>
#include <errno.h>
@@ -52,7 +52,7 @@ static int next_free_slot = 0;
*/
struct fpm_event_module_s *fpm_event_poll_module() /* {{{ */
{
-#if HAVE_POLL
+#ifdef HAVE_POLL
return &poll_module;
#else
return NULL;
@@ -60,7 +60,7 @@ struct fpm_event_module_s *fpm_event_poll_module() /* {{{ */
}
/* }}} */
-#if HAVE_POLL
+#ifdef HAVE_POLL
/*
* Init the module
diff --git a/sapi/fpm/fpm/events/port.c b/sapi/fpm/fpm/events/port.c
index 7887c8e61a..d9aee3bfcd 100644
--- a/sapi/fpm/fpm/events/port.c
+++ b/sapi/fpm/fpm/events/port.c
@@ -19,7 +19,7 @@
#include "../fpm.h"
#include "../zlog.h"
-#if HAVE_PORT
+#ifdef HAVE_PORT
#include <port.h>
#include <poll.h>
@@ -49,7 +49,7 @@ static int pfd = -1;
struct fpm_event_module_s *fpm_event_port_module() /* {{{ */
{
-#if HAVE_PORT
+#ifdef HAVE_PORT
return &port_module;
#else
return NULL;
@@ -57,7 +57,7 @@ struct fpm_event_module_s *fpm_event_port_module() /* {{{ */
}
/* }}} */
-#if HAVE_PORT
+#ifdef HAVE_PORT
/*
* Init the module
diff --git a/sapi/fpm/fpm/events/select.c b/sapi/fpm/fpm/events/select.c
index 23a5bb6d28..61b33c5569 100644
--- a/sapi/fpm/fpm/events/select.c
+++ b/sapi/fpm/fpm/events/select.c
@@ -19,7 +19,7 @@
#include "../fpm.h"
#include "../zlog.h"
-#if HAVE_SELECT
+#ifdef HAVE_SELECT
/* According to POSIX.1-2001 */
#include <sys/select.h>
@@ -55,7 +55,7 @@ static fd_set fds;
*/
struct fpm_event_module_s *fpm_event_select_module() /* {{{ */
{
-#if HAVE_SELECT
+#ifdef HAVE_SELECT
return &select_module;
#else
return NULL;
@@ -63,7 +63,7 @@ struct fpm_event_module_s *fpm_event_select_module() /* {{{ */
}
/* }}} */
-#if HAVE_SELECT
+#ifdef HAVE_SELECT
/*
* Init the module
diff --git a/sapi/fpm/fpm/fpm_clock.c b/sapi/fpm/fpm/fpm_clock.c
index 8568d7928f..cd0bb7320c 100644
--- a/sapi/fpm/fpm/fpm_clock.c
+++ b/sapi/fpm/fpm/fpm_clock.c
@@ -2,7 +2,7 @@
#include "fpm_config.h"
-#if defined(HAVE_CLOCK_GETTIME)
+#ifdef HAVE_CLOCK_GETTIME
#include <time.h> /* for CLOCK_MONOTONIC */
#endif
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 166209bf46..8fab8d6bd2 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -33,11 +33,11 @@
#include <stdio.h>
#include "php.h"
-#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
@@ -45,15 +45,15 @@
#include <locale.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#if HAVE_SYS_WAIT_H
+#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
-#if HAVE_FCNTL_H
+#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
@@ -1807,7 +1807,7 @@ consult the installation file that came with this distribution, or visit \n\
<a href=\"http://php.net/install.windows\">the manual page</a>.</p>\n");
} zend_catch {
} zend_end_try();
-#if defined(ZTS) && !defined(PHP_DEBUG)
+#if defined(ZTS) && !PHP_DEBUG
/* XXX we're crashing here in msvc6 debug builds at
* php_message_handler_for_zend:839 because
* SG(request_info).path_translated is an invalid pointer.
diff --git a/sapi/fpm/fpm/fpm_sockets.h b/sapi/fpm/fpm/fpm_sockets.h
index 9d899c0757..8f1e3846b2 100644
--- a/sapi/fpm/fpm/fpm_sockets.h
+++ b/sapi/fpm/fpm/fpm_sockets.h
@@ -14,7 +14,7 @@
/*
On FreeBSD and OpenBSD, backlog negative values are truncated to SOMAXCONN
*/
-#if (__FreeBSD__) || (__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
#define FPM_BACKLOG_DEFAULT -1
#else
#define FPM_BACKLOG_DEFAULT 511
diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c
index ddedfb48c7..1742467b36 100644
--- a/sapi/fpm/fpm/fpm_stdio.c
+++ b/sapi/fpm/fpm/fpm_stdio.c
@@ -49,7 +49,7 @@ static inline int fpm_use_error_log() { /* {{{ */
* - SysV init launch php-fpm as a daemon
* - Systemd launch php-fpm in foreground
*/
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
if (fpm_global_config.daemonize || (!isatty(STDERR_FILENO) && !fpm_globals.force_stderr)) {
#else
if (fpm_global_config.daemonize) {