From 0778bedbe1fab17d8577061ac2f8ff1954f4196c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 16 Mar 2011 23:54:14 +0000 Subject: [PATCH] - MFH: make setlocale thread only, drastically reduce TS related crashes in error mgt and other parts like pcre, and actually a good thing (tm) --- main/SAPI.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.40.0