diff options
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r-- | ext/standard/string.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index ab8280346..0977ff97c 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -198,8 +198,18 @@ PHPAPI struct lconv *localeconv_r(struct lconv *out) tsrm_mutex_lock( locale_mutex ); # endif +#if defined(PHP_WIN32) && defined(ZTS) + { + /* Even with the enabled per thread locale, localeconv + won't check any locale change in the master thread. */ + _locale_t cur = _get_current_locale(); + + res = cur->locinfo->lconv; + } +#else /* localeconv doesn't return an error condition */ res = localeconv(); +#endif *out = *res; |