]> granicus.if.org Git - php/commit
Remove checks for locale.h, setlocale, localeconv
authorPeter Kokot <peterkokot@gmail.com>
Sun, 24 Feb 2019 09:21:25 +0000 (10:21 +0100)
committerPeter Kokot <peterkokot@gmail.com>
Sun, 7 Apr 2019 16:32:54 +0000 (18:32 +0200)
commite06836a1a345d0f6975036dc6c0cf7596aa07031
tree3e46afae0d1303c0e568875bd661c6d6480f43a3
parent5f8915786f9fc3ec1af1089c9848f65a8d1541f5
Remove checks for locale.h, setlocale, localeconv

The `<loccale.h>` header file, setlocale, and localeconv are part of the
standard C89 [1] and on current systems can be used unconditionally.

Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`,
`HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in
configure.ac [2] can be ommitted and simplifed.

The bundled libmagic (file) has also been patched already in version
5.35 and up in upstream location so when it will be patched also in
php-src the check for locale.h header is still left in the configure.ac
and in windows headers definition file.

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

Omit the bundled libmagic files
20 files changed:
Zend/zend_operators.h
configure.ac
ext/pcre/php_pcre.c
ext/pcre/php_pcre.h
ext/readline/readline_cli.c
ext/standard/basic_functions.c
ext/standard/formatted_print.c
ext/standard/html.c
ext/standard/php_string.h
ext/standard/scanf.c
ext/standard/string.c
main/main.c
main/snprintf.c
main/spprintf.c
sapi/cgi/cgi_main.c
sapi/cli/php_cli.c
sapi/cli/php_cli_server.c
sapi/fpm/fpm/fpm_main.c
sapi/phpdbg/phpdbg_out.c
win32/build/config.w32.h.in