summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2011-03-16 23:54:14 +0000
committerPierre Joye <pajoye@php.net>2011-03-16 23:54:14 +0000
commit0778bedbe1fab17d8577061ac2f8ff1954f4196c (patch)
tree4c4e0a52e5ea35f5dbea6183f471a5f700e61a30
parente90ac23f580e691d8305f7e4412968d5d5e22bfb (diff)
downloadphp-git-0778bedbe1fab17d8577061ac2f8ff1954f4196c.tar.gz
- MFH: make setlocale thread only, drastically reduce TS related crashes in error mgt and other parts like pcre, and actually a good thing (tm)
-rw-r--r--main/SAPI.c3
1 files changed, 3 insertions, 0 deletions
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