From 6c1ff61a368a26c8f2cbf383aa8a26fc30cf59ef Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 5 Sep 2018 02:53:12 +0200 Subject: [PATCH] Remove HAVE_STDDEF_H The `` header file is part of the standard C89 headers [1] and on current systems there is no need for a manual check if header is present. Since PHP requires at least C89 the `HAVE_STDDEF_H` symbol isn't defined by Autoconf anywhere else anymore [2] and accross the PHP source code the header is included unconditionally already. This patch syncs this also for the bundled libmbfl which is maintaned as a fork in php-src. Refs: [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4 --- ext/mbstring/libmbfl/config.h.in | 3 --- ext/mbstring/libmbfl/config.h.w32 | 1 - ext/mbstring/libmbfl/mbfl/mbfilter.c | 4 ---- ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c | 2 -- ext/mbstring/libmbfl/mbfl/mbfilter_pass.c | 2 -- ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c | 2 -- ext/mbstring/libmbfl/mbfl/mbfl_allocators.c | 2 -- ext/mbstring/libmbfl/mbfl/mbfl_convert.c | 2 -- ext/mbstring/libmbfl/mbfl/mbfl_encoding.c | 2 -- ext/mbstring/libmbfl/mbfl/mbfl_ident.c | 2 -- ext/mbstring/libmbfl/mbfl/mbfl_language.c | 6 ------ ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c | 2 -- ext/mbstring/libmbfl/mbfl/mbfl_string.c | 2 -- ext/mbstring/libmbfl/nls/nls_de.c | 2 -- ext/mbstring/libmbfl/nls/nls_en.c | 2 -- ext/mbstring/libmbfl/nls/nls_hy.c | 2 -- ext/mbstring/libmbfl/nls/nls_ja.c | 2 -- ext/mbstring/libmbfl/nls/nls_kr.c | 2 -- ext/mbstring/libmbfl/nls/nls_neutral.c | 2 -- ext/mbstring/libmbfl/nls/nls_ru.c | 2 -- ext/mbstring/libmbfl/nls/nls_tr.c | 2 -- ext/mbstring/libmbfl/nls/nls_ua.c | 4 ---- ext/mbstring/libmbfl/nls/nls_uni.c | 2 -- ext/mbstring/libmbfl/nls/nls_zh.c | 2 -- main/php_network.h | 2 -- 25 files changed, 58 deletions(-) diff --git a/ext/mbstring/libmbfl/config.h.in b/ext/mbstring/libmbfl/config.h.in index 867df524e9..c30fa09f4a 100644 --- a/ext/mbstring/libmbfl/config.h.in +++ b/ext/mbstring/libmbfl/config.h.in @@ -20,9 +20,6 @@ and to 0 otherwise. */ #undef HAVE_REALLOC -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H diff --git a/ext/mbstring/libmbfl/config.h.w32 b/ext/mbstring/libmbfl/config.h.w32 index 7458e441eb..14393a0741 100644 --- a/ext/mbstring/libmbfl/config.h.w32 +++ b/ext/mbstring/libmbfl/config.h.w32 @@ -1,6 +1,5 @@ #define HAVE_STDIO_H 1 #define HAVE_STDLIB_H 1 -#define HAVE_STDDEF_H 1 #define HAVE_ASSERT_H 1 #define HAVE_MEMORY_H 1 /* #undef HAVE_STRINGS_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 48dbc75920..56f03b6355 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -94,10 +94,6 @@ #include #endif -#ifdef HAVE_STDDEF_H -#include -#endif - #include "mbfilter.h" #include "mbfl_filter_output.h" #include "mbfilter_8bit.h" diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c index 4faa9b8b1b..b38e408806 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c @@ -32,9 +32,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c index a9c6fd4204..24392e0776 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c @@ -31,9 +31,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "mbfilter_pass.h" diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c index 97142a16cb..b313cf580e 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c @@ -32,9 +32,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_allocators.c b/ext/mbstring/libmbfl/mbfl/mbfl_allocators.c index aa468da252..070bee686d 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_allocators.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_allocators.c @@ -48,9 +48,7 @@ #include #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfl_allocators.h" diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c index 7a0fb60264..9e900ddfca 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c @@ -32,9 +32,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfl_encoding.h" #include "mbfl_allocators.h" diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c index 77c5daeeff..a1367230d8 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c @@ -32,9 +32,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #ifdef HAVE_STRING_H #include diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_ident.c b/ext/mbstring/libmbfl/mbfl/mbfl_ident.c index 9f8e780769..ce7cf13566 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_ident.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_ident.c @@ -32,9 +32,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfl_ident.h" #include "mbfl_allocators.h" diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_language.c b/ext/mbstring/libmbfl/mbfl/mbfl_language.c index 9ca2d59183..ca0307983f 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_language.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_language.c @@ -32,13 +32,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif - -#ifdef HAVE_STDDEF_H -#include -#endif #ifdef HAVE_STRING_H #include diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c b/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c index bfa477fa06..0dd8ea2e66 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c @@ -32,9 +32,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include #include "mbfl_allocators.h" diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_string.c b/ext/mbstring/libmbfl/mbfl/mbfl_string.c index b26226500b..b0f86e958a 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_string.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_string.c @@ -32,9 +32,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfl_allocators.h" #include "mbfl_string.h" diff --git a/ext/mbstring/libmbfl/nls/nls_de.c b/ext/mbstring/libmbfl/nls/nls_de.c index b559e2dee3..7fb7a26f26 100644 --- a/ext/mbstring/libmbfl/nls/nls_de.c +++ b/ext/mbstring/libmbfl/nls/nls_de.c @@ -2,9 +2,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "nls_de.h" diff --git a/ext/mbstring/libmbfl/nls/nls_en.c b/ext/mbstring/libmbfl/nls/nls_en.c index 0700e4f2c4..46a647af2f 100644 --- a/ext/mbstring/libmbfl/nls/nls_en.c +++ b/ext/mbstring/libmbfl/nls/nls_en.c @@ -2,9 +2,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "nls_en.h" diff --git a/ext/mbstring/libmbfl/nls/nls_hy.c b/ext/mbstring/libmbfl/nls/nls_hy.c index 1c4b383510..7344abbb21 100644 --- a/ext/mbstring/libmbfl/nls/nls_hy.c +++ b/ext/mbstring/libmbfl/nls/nls_hy.c @@ -2,9 +2,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "nls_hy.h" diff --git a/ext/mbstring/libmbfl/nls/nls_ja.c b/ext/mbstring/libmbfl/nls/nls_ja.c index d5541fa73a..c3b3694bf5 100644 --- a/ext/mbstring/libmbfl/nls/nls_ja.c +++ b/ext/mbstring/libmbfl/nls/nls_ja.c @@ -2,9 +2,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "nls_ja.h" diff --git a/ext/mbstring/libmbfl/nls/nls_kr.c b/ext/mbstring/libmbfl/nls/nls_kr.c index afff43af48..3b1a7add3f 100644 --- a/ext/mbstring/libmbfl/nls/nls_kr.c +++ b/ext/mbstring/libmbfl/nls/nls_kr.c @@ -2,9 +2,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "nls_kr.h" diff --git a/ext/mbstring/libmbfl/nls/nls_neutral.c b/ext/mbstring/libmbfl/nls/nls_neutral.c index 87a6a194c3..8abd3e91a4 100644 --- a/ext/mbstring/libmbfl/nls/nls_neutral.c +++ b/ext/mbstring/libmbfl/nls/nls_neutral.c @@ -2,9 +2,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "nls_neutral.h" diff --git a/ext/mbstring/libmbfl/nls/nls_ru.c b/ext/mbstring/libmbfl/nls/nls_ru.c index 7e4cf9c3b0..c4526305d1 100644 --- a/ext/mbstring/libmbfl/nls/nls_ru.c +++ b/ext/mbstring/libmbfl/nls/nls_ru.c @@ -2,9 +2,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "nls_ru.h" diff --git a/ext/mbstring/libmbfl/nls/nls_tr.c b/ext/mbstring/libmbfl/nls/nls_tr.c index c7044ff293..1d17bd29f7 100644 --- a/ext/mbstring/libmbfl/nls/nls_tr.c +++ b/ext/mbstring/libmbfl/nls/nls_tr.c @@ -2,9 +2,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "nls_tr.h" diff --git a/ext/mbstring/libmbfl/nls/nls_ua.c b/ext/mbstring/libmbfl/nls/nls_ua.c index 85fe9b49f9..8f75b34cdb 100644 --- a/ext/mbstring/libmbfl/nls/nls_ua.c +++ b/ext/mbstring/libmbfl/nls/nls_ua.c @@ -2,11 +2,7 @@ #include "config.h" #endif - -#ifdef HAVE_STDDEF_H #include -#endif - #include "mbfilter.h" #include "nls_ua.h" diff --git a/ext/mbstring/libmbfl/nls/nls_uni.c b/ext/mbstring/libmbfl/nls/nls_uni.c index 6a0100105b..d4fb42c291 100644 --- a/ext/mbstring/libmbfl/nls/nls_uni.c +++ b/ext/mbstring/libmbfl/nls/nls_uni.c @@ -2,9 +2,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "nls_uni.h" diff --git a/ext/mbstring/libmbfl/nls/nls_zh.c b/ext/mbstring/libmbfl/nls/nls_zh.c index d9a49931ea..2de90153b0 100644 --- a/ext/mbstring/libmbfl/nls/nls_zh.c +++ b/ext/mbstring/libmbfl/nls/nls_zh.c @@ -2,9 +2,7 @@ #include "config.h" #endif -#ifdef HAVE_STDDEF_H #include -#endif #include "mbfilter.h" #include "nls_zh.h" diff --git a/main/php_network.h b/main/php_network.h index 4d6b18f43a..296be2b17f 100644 --- a/main/php_network.h +++ b/main/php_network.h @@ -89,9 +89,7 @@ END_EXTERN_C() #include #endif -#ifdef HAVE_STDDEF_H #include -#endif #ifdef PHP_WIN32 typedef SOCKET php_socket_t; -- 2.40.0