Skip to content

Commit

Permalink
Remove HAVE_STDDEF_H
Browse files Browse the repository at this point in the history
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
  • Loading branch information
petk authored and krakjoe committed Sep 5, 2018
1 parent 3b1b0c5 commit 6c1ff61
Show file tree
Hide file tree
Showing 25 changed files with 0 additions and 58 deletions.
3 changes: 0 additions & 3 deletions ext/mbstring/libmbfl/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion ext/mbstring/libmbfl/config.h.w32
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down
4 changes: 0 additions & 4 deletions ext/mbstring/libmbfl/mbfl/mbfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@
#include <strings.h>
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "mbfl_filter_output.h"
#include "mbfilter_8bit.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"

Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/mbfl/mbfilter_pass.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "mbfilter_pass.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"

Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/mbfl/mbfl_allocators.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@
#include <strings.h>
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfl_allocators.h"

Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/mbfl/mbfl_convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfl_encoding.h"
#include "mbfl_allocators.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/mbfl/mbfl_encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#ifdef HAVE_STRING_H
#include <string.h>
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/mbfl/mbfl_ident.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfl_ident.h"
#include "mbfl_allocators.h"
Expand Down
6 changes: 0 additions & 6 deletions ext/mbstring/libmbfl/mbfl/mbfl_language.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@
#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>
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include <string.h>
#include "mbfl_allocators.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/mbfl/mbfl_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfl_allocators.h"
#include "mbfl_string.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/nls/nls_de.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "nls_de.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/nls/nls_en.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "nls_en.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/nls/nls_hy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "nls_hy.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/nls/nls_ja.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "nls_ja.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/nls/nls_kr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "nls_kr.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/nls/nls_neutral.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "nls_neutral.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/nls/nls_ru.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "nls_ru.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/nls/nls_tr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "nls_tr.h"
Expand Down
4 changes: 0 additions & 4 deletions ext/mbstring/libmbfl/nls/nls_ua.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
#include "config.h"
#endif


#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif


#include "mbfilter.h"
#include "nls_ua.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/nls/nls_uni.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "nls_uni.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/mbstring/libmbfl/nls/nls_zh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#include "config.h"
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#include "mbfilter.h"
#include "nls_zh.h"
Expand Down
2 changes: 0 additions & 2 deletions main/php_network.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c1ff61

Please sign in to comment.