Fix [-Wundef] warning in FPM SAPI

This commit is contained in:
George Peter Banyard 2020-05-12 17:53:41 +02:00
parent 25acc4a6b4
commit f87743de9f
10 changed files with 27 additions and 27 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View file

@ -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.

View 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

View 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) {