diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-09-16 01:14:08 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-09-18 05:32:08 +0200 |
commit | d3ca28f5694e7848fb2b238bbe3e9564230ae65e (patch) | |
tree | 60bef3e2097c17b370ddc8eaee424416bbd39399 /Zend | |
parent | cfe46a5d7970e988591f0593ae3ebddf9e5196f4 (diff) | |
download | php-git-d3ca28f5694e7848fb2b238bbe3e9564230ae65e.tar.gz |
Remove HAVE_STRING_H
The C89 standard and later defines the `<string.h>` header as part of
the standard headers [1] and on current systems it is always present.
Code included also `<strings.h>` header as an alterinative in some
files. This kind of check was relevant on some older systems where the
`<strings.h>` file included definitions for the C89 compliant
`<string.h>`. Today such alternative check is not required anymore. The
`<strings.h>` file is part of the POSIX definition these days.
Also Autoconf suggests doing this and relying on C89 or above [2] and [3].
This patch also cleans few unused `<strings.h>` inclusions in the libmbfl.
[1]: https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2]: http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3]: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/Zend.m4 | 1 | ||||
-rw-r--r-- | Zend/configure.ac | 6 |
2 files changed, 1 insertions, 6 deletions
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index 8b7971eea1..55a98d6ff3 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -50,7 +50,6 @@ inttypes.h \ stdint.h \ limits.h \ malloc.h \ -string.h \ unistd.h \ stdarg.h \ sys/types.h \ diff --git a/Zend/configure.ac b/Zend/configure.ac index 5b88ff0ead..8252cfb342 100644 --- a/Zend/configure.ac +++ b/Zend/configure.ac @@ -42,11 +42,7 @@ AH_BOTTOM([ # include <ieeefp.h> #endif -#ifdef HAVE_STRING_H -# include <string.h> -#else -# include <strings.h> -#endif +#include <string.h> #if ZEND_BROKEN_SPRINTF int zend_sprintf(char *buffer, const char *format, ...); |