From 2d3427c5079d102f49bba79bd62a05c0ea8c873a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 16 Jan 2023 12:29:41 +0100 Subject: [PATCH] Revert "#include cleanup (#10216)" Cf. . This reverts commit e628c66f9d4173e585081ddef358505433f9a288. --- Zend/zend_alloc.c | 2 +- Zend/zend_alloc.h | 6 ++++-- Zend/zend_hash.c | 1 - Zend/zend_hash.h | 7 ++----- Zend/zend_portability.h | 6 ------ Zend/zend_sort.c | 2 ++ Zend/zend_sort.h | 3 --- Zend/zend_string.c | 1 - Zend/zend_string.h | 4 +--- 9 files changed, 10 insertions(+), 22 deletions(-) diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 5f2f25c0c48..5f11f49b071 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -51,8 +51,8 @@ * with more specialized routines when the requested size is known. */ -#include "zend_alloc.h" #include "zend.h" +#include "zend_alloc.h" #include "zend_globals.h" #include "zend_operators.h" #include "zend_multiply.h" diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 0fe1ff98c6f..578d4c78cc5 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -21,8 +21,10 @@ #ifndef ZEND_ALLOC_H #define ZEND_ALLOC_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zend_result +#include + +#include "../TSRM/TSRM.h" +#include "zend.h" #ifndef ZEND_MM_ALIGNMENT # error "ZEND_MM_ALIGNMENT was not defined during configure" diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index db1c0a6b49d..93d10119519 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -18,7 +18,6 @@ +----------------------------------------------------------------------+ */ -#include "zend_hash.h" #include "zend.h" #include "zend_globals.h" #include "zend_variables.h" diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 09495f5fb2f..93b9f0d4530 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -21,11 +21,8 @@ #ifndef ZEND_HASH_H #define ZEND_HASH_H -#include "zend_alloc.h" // for pefree() -#include "zend_long.h" -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_sort.h" // for zend_sort() -#include "zend_string.h" // for ZSTR_VAL() +#include "zend.h" +#include "zend_sort.h" #define HASH_KEY_IS_STRING 1 #define HASH_KEY_IS_LONG 2 diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index b11be27b788..87ab51724bb 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -21,12 +21,6 @@ #ifndef ZEND_PORTABILITY_H #define ZEND_PORTABILITY_H -#ifdef PHP_WIN32 -#include "config.w32.h" -#else -#include "php_config.h" // for HAVE_* -#endif - #ifdef __cplusplus #define BEGIN_EXTERN_C() extern "C" { #define END_EXTERN_C() } diff --git a/Zend/zend_sort.c b/Zend/zend_sort.c index f43d5cae63f..355d2d1bad5 100644 --- a/Zend/zend_sort.c +++ b/Zend/zend_sort.c @@ -17,7 +17,9 @@ +----------------------------------------------------------------------+ */ +#include "zend.h" #include "zend_sort.h" +#include static inline void zend_sort_2(void *a, void *b, compare_func_t cmp, swap_func_t swp) /* {{{ */ { if (cmp(a, b) > 0) { diff --git a/Zend/zend_sort.h b/Zend/zend_sort.h index 320b5e56066..e606935f790 100644 --- a/Zend/zend_sort.h +++ b/Zend/zend_sort.h @@ -20,9 +20,6 @@ #ifndef ZEND_SORT_H #define ZEND_SORT_H -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for compare_func_t, swap_func_t - BEGIN_EXTERN_C() ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp); ZEND_API void zend_insert_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp); diff --git a/Zend/zend_string.c b/Zend/zend_string.c index eef68c8e8ac..68e6084fdf6 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -16,7 +16,6 @@ +----------------------------------------------------------------------+ */ -#include "zend_string.h" #include "zend.h" #include "zend_globals.h" diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 1c658ae2bbd..f2fe44d59eb 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -19,9 +19,7 @@ #ifndef ZEND_STRING_H #define ZEND_STRING_H -#include "zend_alloc.h" // for pemalloc() -#include "zend_portability.h" // for BEGIN_EXTERN_C -#include "zend_types.h" // for zend_string +#include "zend.h" BEGIN_EXTERN_C()