]> granicus.if.org Git - php/commitdiff
Fix [-Wundef] warning in FPM SAPI
authorGeorge Peter Banyard <girgias@php.net>
Tue, 12 May 2020 15:53:41 +0000 (17:53 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Tue, 12 May 2020 20:02:03 +0000 (22:02 +0200)
sapi/fpm/fpm/events/devpoll.c
sapi/fpm/fpm/events/epoll.c
sapi/fpm/fpm/events/kqueue.c
sapi/fpm/fpm/events/poll.c
sapi/fpm/fpm/events/port.c
sapi/fpm/fpm/events/select.c
sapi/fpm/fpm/fpm_clock.c
sapi/fpm/fpm/fpm_main.c
sapi/fpm/fpm/fpm_sockets.h
sapi/fpm/fpm/fpm_stdio.c

index 15afb2beda20c8b9a98368e55487c4c9738fe54b..0d165fe2fc8b465c7945f5540e3e3eb11ed637db 100644 (file)
@@ -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
index b81c7fa59ca6736bd74eb172a4ea9a1476577003..9973ac0ddcef199bd549c85b8b8434168f834ae8 100644 (file)
@@ -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
index 42d70ecd6c629e0a9e9a8f0ab3cfadb548cf88fa..69a3f2405733facf2afc6038d7b8bebe7623bc37 100644 (file)
@@ -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
index ad18d0bdeaa21084c775e8bf59359df2861ffe31..0363c2ece10a4f86522f3738dbd4880277f73f14 100644 (file)
@@ -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
index 7887c8e61a8d2b094f4868ba4034692dd9170770..d9aee3bfcd4625f838e64509ef4843a022a456e6 100644 (file)
@@ -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
index 23a5bb6d283f82892ab9bf70e753515a86b404d1..61b33c55695da3f29b6753774583d2e8ec924384 100644 (file)
@@ -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
index 8568d7928f083aace2096c6aa5f728dbc2fc54f5..cd0bb7320c5cbf37adc2a18dca3e8526ea77f185 100644 (file)
@@ -2,7 +2,7 @@
 
 #include "fpm_config.h"
 
-#if defined(HAVE_CLOCK_GETTIME)
+#ifdef HAVE_CLOCK_GETTIME
 #include <time.h> /* for CLOCK_MONOTONIC */
 #endif
 
index 166209bf464447ac54513e4f18264f4c2a820eec..8fab8d6bd27d638e4a6da56d8ab503d7d6a6b960 100644 (file)
 #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
 
 
 #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.
index 9d899c07576d88ea164dbfbae0d91e5bbe495457..8f1e3846b291982f5bec3548323ee8d2983e7da5 100644 (file)
@@ -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
index ddedfb48c7cfc25316cf4f10bd164fd0c681f83a..1742467b368169cbc540c25b39bcdeb9712ecd41 100644 (file)
@@ -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) {