diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index 80d6cbad04435..e309a07f034ce 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -16,8 +16,27 @@ #if !defined(__CYGWIN__) && defined(_WIN32) # define TSRM_WIN32 # include +# define _CRTDBG_MAP_ALLOC +# include +# include +# include +# include +# ifndef ZEND_INCLUDE_FULL_WINDOWS_HEADERS +# define WIN32_LEAN_AND_MEAN +# endif +# include +# include +# include #else # include
+# include +# ifdef HAVE_SYS_TYPES_H +# include +# endif +# ifdef HAVE_SYS_SELECT_H +# include +# endif +# include #endif #include diff --git a/Zend/zend.h b/Zend/zend.h index 0cf1faeb653fe..3f88c9d50fd37 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -24,6 +24,32 @@ #define ZEND_ENGINE_3 +#if !defined(__CYGWIN__) && defined(_WIN32) +# define TSRM_WIN32 +# include +# define _CRTDBG_MAP_ALLOC +# include +# include +# include +# include +# ifndef ZEND_INCLUDE_FULL_WINDOWS_HEADERS +# define WIN32_LEAN_AND_MEAN +# endif +# include +# include +# include +#else +# include
+# include +# ifdef HAVE_SYS_TYPES_H +# include +# endif +# ifdef HAVE_SYS_SELECT_H +# include +# endif +# include +#endif + #include "zend_types.h" #include "zend_map_ptr.h" #include "zend_errors.h" diff --git a/Zend/zend_config.w32.h b/Zend/zend_config.w32.h index ffd5f1736ee4a..5b324fe2938b0 100644 --- a/Zend/zend_config.w32.h +++ b/Zend/zend_config.w32.h @@ -22,22 +22,6 @@ #include <../main/config.w32.h> -#define _CRTDBG_MAP_ALLOC - -#include -#include -#include - -#include - -#ifndef ZEND_INCLUDE_FULL_WINDOWS_HEADERS -#define WIN32_LEAN_AND_MEAN -#endif -#include -#include - -#include - #if _MSC_VER < 1900 #define snprintf _snprintf #endif diff --git a/configure.ac b/configure.ac index 01d9ded69b920..2483a3d23e53c 100644 --- a/configure.ac +++ b/configure.ac @@ -43,18 +43,6 @@ AH_TOP([ #define ZEND_DLIMPORT ]) AH_BOTTOM([ -#include - -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#include - #endif /* PHP_CONFIG_H */ ]) diff --git a/sapi/fpm/fpm/fpm.h b/sapi/fpm/fpm/fpm.h index ec036a2d68198..a82f5ab640e9c 100644 --- a/sapi/fpm/fpm/fpm.h +++ b/sapi/fpm/fpm/fpm.h @@ -3,6 +3,7 @@ #ifndef FPM_H #define FPM_H 1 +#include #include #ifdef HAVE_SYSEXITS_H diff --git a/sapi/fpm/fpm/fpm_events.h b/sapi/fpm/fpm/fpm_events.h index 8097477c827f3..2e6904abaa1c7 100644 --- a/sapi/fpm/fpm/fpm_events.h +++ b/sapi/fpm/fpm/fpm_events.h @@ -3,6 +3,8 @@ #ifndef FPM_EVENTS_H #define FPM_EVENTS_H 1 +#include + #define FPM_EV_TIMEOUT (1 << 0) #define FPM_EV_READ (1 << 1) #define FPM_EV_PERSIST (1 << 2)