]> granicus.if.org Git - php/commitdiff
Remove HAVE_STDDEF_H
authorPeter Kokot <peterkokot@gmail.com>
Wed, 5 Sep 2018 00:53:12 +0000 (02:53 +0200)
committerJoe Watkins <krakjoe@php.net>
Wed, 5 Sep 2018 09:51:19 +0000 (11:51 +0200)
The `<stddef.h>` 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

25 files changed:
ext/mbstring/libmbfl/config.h.in
ext/mbstring/libmbfl/config.h.w32
ext/mbstring/libmbfl/mbfl/mbfilter.c
ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c
ext/mbstring/libmbfl/mbfl/mbfilter_pass.c
ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c
ext/mbstring/libmbfl/mbfl/mbfl_allocators.c
ext/mbstring/libmbfl/mbfl/mbfl_convert.c
ext/mbstring/libmbfl/mbfl/mbfl_encoding.c
ext/mbstring/libmbfl/mbfl/mbfl_ident.c
ext/mbstring/libmbfl/mbfl/mbfl_language.c
ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c
ext/mbstring/libmbfl/mbfl/mbfl_string.c
ext/mbstring/libmbfl/nls/nls_de.c
ext/mbstring/libmbfl/nls/nls_en.c
ext/mbstring/libmbfl/nls/nls_hy.c
ext/mbstring/libmbfl/nls/nls_ja.c
ext/mbstring/libmbfl/nls/nls_kr.c
ext/mbstring/libmbfl/nls/nls_neutral.c
ext/mbstring/libmbfl/nls/nls_ru.c
ext/mbstring/libmbfl/nls/nls_tr.c
ext/mbstring/libmbfl/nls/nls_ua.c
ext/mbstring/libmbfl/nls/nls_uni.c
ext/mbstring/libmbfl/nls/nls_zh.c
main/php_network.h

index 867df524e9981458e32145b3424f63e6ec722603..c30fa09f4ae1dcccac5fffd2e1101c5912a301c1 100644 (file)
@@ -20,9 +20,6 @@
    and to 0 otherwise. */
 #undef HAVE_REALLOC
 
-/* Define to 1 if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
-
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
index 7458e441eb51d3af8adde0ef06c73912c9c559b5..14393a074125ffe3b7f2a932bad393b2f8588150 100644 (file)
@@ -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 */
index 48dbc75920987969baffc51aa23268c472125b26..56f03b63553eebdb82034d976d02f6b6027afa58 100644 (file)
 #include <strings.h>
 #endif
 
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-
 #include "mbfilter.h"
 #include "mbfl_filter_output.h"
 #include "mbfilter_8bit.h"
index 4faa9b8b1bb069ebe4d0067bec6b4fb108e1f9fd..b38e4088064572cf832825c5cec70517834bdbc6 100644 (file)
@@ -32,9 +32,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 
index a9c6fd42048179f6148b24cbf44c03ef3d5b06c0..24392e07761f3680cc559a8cf8b1e23b93210f29 100644 (file)
@@ -31,9 +31,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "mbfilter_pass.h"
index 97142a16cb04e9e8c96c57306e901fdc871760a3..b313cf580e9f5b0f05e68c65518d284b32c6aade 100644 (file)
@@ -32,9 +32,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 
index aa468da2528ac12398b2c8ee11ce3d6c9f61ba3f..070bee686ddafbc249d98966830cd822c3ee7460 100644 (file)
@@ -48,9 +48,7 @@
 #include <strings.h>
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfl_allocators.h"
 
index 7a0fb60264c21ba58789707111d0ff3716885955..9e900ddfca637eb3f3eaa3a28d7a701dc19f5c89 100644 (file)
@@ -32,9 +32,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfl_encoding.h"
 #include "mbfl_allocators.h"
index 77c5daeeffbaf44e9698b3b782ec7af1ec1508da..a1367230d856b1b34e64fcf6532f6fe85216d420 100644 (file)
@@ -32,9 +32,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #ifdef HAVE_STRING_H
 #include <string.h>
index 9f8e780769a807fadfc1f319419f5d6b51e501ec..ce7cf135667aa46add3f93311ec0713895778b41 100644 (file)
@@ -32,9 +32,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfl_ident.h"
 #include "mbfl_allocators.h"
index 9ca2d5918392b2993624a7d5d74ad7c94f6f8273..ca0307983fcfddf863558605096c7d3c552ed1ac 100644 (file)
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
-
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
 
 #ifdef HAVE_STRING_H
 #include <string.h>
index bfa477fa06b0d6bdab73557838d62b47a9675fce..0dd8ea2e664c6c2279f4f789c03faaf99297e701 100644 (file)
@@ -32,9 +32,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include <string.h>
 #include "mbfl_allocators.h"
index b26226500b769fc18c8d31ebf598677b024ecefd..b0f86e958a101bb453af26f55f379c6ae2b3f378 100644 (file)
@@ -32,9 +32,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfl_allocators.h"
 #include "mbfl_string.h"
index b559e2dee304bbe7093ca12fa63e587bf85aa024..7fb7a26f26941132ffbb00f971c748362757fa7c 100644 (file)
@@ -2,9 +2,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "nls_de.h"
index 0700e4f2c4e1a9b1d2f2354a044e728689f26f39..46a647af2f3133f9d996331b24fcf1d87241fd95 100644 (file)
@@ -2,9 +2,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "nls_en.h"
index 1c4b383510128f830075c8338f427ad047f7c5f6..7344abbb2105e26bf397b8c299a869e957aa6d25 100644 (file)
@@ -2,9 +2,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "nls_hy.h"
index d5541fa73aebd661d3d5369587e0d0722cf7053f..c3b3694bf51e0d2b19c7c910595aada110cf262b 100644 (file)
@@ -2,9 +2,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "nls_ja.h"
index afff43af489ef45f600e97fc76e402d4aed5c633..3b1a7add3f8a4ecf78eb3f9665e561df6d071aed 100644 (file)
@@ -2,9 +2,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "nls_kr.h"
index 87a6a194c3460801ab37825b8439c083019c0a3e..8abd3e91a48ed1c3ebc0698301f3da6eaaad7519 100644 (file)
@@ -2,9 +2,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "nls_neutral.h"
index 7e4cf9c3b0562678ab99250282b7e2c2ec222020..c4526305d1d5d72f9420a5ef836bde140d7eb953 100644 (file)
@@ -2,9 +2,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "nls_ru.h"
index c7044ff293fa6f8ba657c816db400930f85eacad..1d17bd29f74215ade877ea9126e7646137742cb3 100644 (file)
@@ -2,9 +2,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "nls_tr.h"
index 85fe9b49f9282db049eff2e5967652e1679df41d..8f75b34cdbc4137b48dec6e3bc268437fb91e1e1 100644 (file)
@@ -2,11 +2,7 @@
 #include "config.h"
 #endif
 
-
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
-
 
 #include "mbfilter.h"
 #include "nls_ua.h"
index 6a0100105b0ecb9f3e919cf2852abbf3f98b596d..d4fb42c29138f5c988cebec5c46c8b801dc34da2 100644 (file)
@@ -2,9 +2,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "nls_uni.h"
index d9a49931eafcb6ff75fe6a00397958a60a7bd735..2de90153b05a013c570c5fc0a8b12fc44013f8b6 100644 (file)
@@ -2,9 +2,7 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include "mbfilter.h"
 #include "nls_zh.h"
index 4d6b18f43a5c7941047c003d6b4613148b2b7772..296be2b17f22f515bbdc847ae887d8565f73d9f9 100644 (file)
@@ -89,9 +89,7 @@ END_EXTERN_C()
 #include <sys/time.h>
 #endif
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #ifdef PHP_WIN32
 typedef SOCKET php_socket_t;