diff options
author | Anatol Belski <ab@php.net> | 2014-12-05 11:08:55 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-12-05 11:08:55 +0100 |
commit | 0e09e5e6fa55593936c473ebfa705e7455d3fafe (patch) | |
tree | a1ea6ab1e411fefebfcc73cb6ab2173396b9d84d /ext/standard/string.c | |
parent | fa863c9ea3986ef701edf86df3e798b1042d7eff (diff) | |
parent | 7943f944c2646f71daf5feb9a0d2f84ec368c1c5 (diff) | |
download | php-git-0e09e5e6fa55593936c473ebfa705e7455d3fafe.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
Fixed bug #65769 localeconv() broken in TS builds
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 ab8280346f..0977ff97cf 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; |