From: Pierre Joye Date: Wed, 16 Mar 2011 23:54:14 +0000 (+0000) Subject: - MFH: make setlocale thread only, drastically reduce TS related crashes in error... X-Git-Tag: php-5.3.6~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0778bedbe1fab17d8577061ac2f8ff1954f4196c;p=php - MFH: make setlocale thread only, drastically reduce TS related crashes in error mgt and other parts like pcre, and actually a good thing (tm) --- diff --git a/main/SAPI.c b/main/SAPI.c index c56676c3c5..3213339634 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -78,6 +78,9 @@ SAPI_API void sapi_startup(sapi_module_struct *sf) #ifdef ZTS ts_allocate_id(&sapi_globals_id, sizeof(sapi_globals_struct), (ts_allocate_ctor) sapi_globals_ctor, (ts_allocate_dtor) sapi_globals_dtor); +# ifdef PHP_WIN32 + _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); +# endif #else sapi_globals_ctor(&sapi_globals); #endif