summaryrefslogtreecommitdiff
path: root/main/main.c
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2019-02-24 10:21:25 +0100
committerPeter Kokot <peterkokot@gmail.com>2019-04-07 18:32:54 +0200
commite06836a1a345d0f6975036dc6c0cf7596aa07031 (patch)
tree3e46afae0d1303c0e568875bd661c6d6480f43a3 /main/main.c
parent5f8915786f9fc3ec1af1089c9848f65a8d1541f5 (diff)
downloadphp-git-e06836a1a345d0f6975036dc6c0cf7596aa07031.tar.gz
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
Diffstat (limited to 'main/main.c')
-rw-r--r--main/main.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/main/main.c b/main/main.c
index 95f6157d45..5eb34b7fa4 100644
--- a/main/main.c
+++ b/main/main.c
@@ -41,10 +41,7 @@
#endif
#include <signal.h>
-
-#if HAVE_SETLOCALE
#include <locale.h>
-#endif
#include "zend.h"
#include "zend_types.h"
#include "zend_extensions.h"
@@ -2176,11 +2173,8 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
zuf.getenv_function = sapi_getenv;
zuf.resolve_path_function = php_resolve_path_for_zend;
zend_startup(&zuf);
-
-#if HAVE_SETLOCALE
setlocale(LC_CTYPE, "");
zend_update_current_locale();
-#endif
#if HAVE_TZSET
tzset();