summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mbstring/config.m42
-rw-r--r--ext/mbstring/config.w322
-rw-r--r--ext/mbstring/mbstring.c7
-rw-r--r--ext/mbstring/mbstring.h3
-rw-r--r--ext/pcre/config.w322
-rw-r--r--ext/pcre/config0.m44
-rw-r--r--ext/pcre/php_pcre.h2
-rwxr-xr-xext/reflection/config.m42
-rwxr-xr-xext/reflection/config.w324
-rw-r--r--ext/reflection/php_reflection.c2
10 files changed, 19 insertions, 11 deletions
diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4
index 25bf238761..c7ae3f99ae 100644
--- a/ext/mbstring/config.m4
+++ b/ext/mbstring/config.m4
@@ -47,7 +47,7 @@ AC_DEFUN([PHP_MBSTRING_EXTENSION], [
PHP_ADD_SOURCES(PHP_EXT_DIR(mbstring), $PHP_MBSTRING_BASE_SOURCES)
out="php_config.h"
else
- PHP_ADD_SOURCES_X(PHP_EXT_DIR(mbstring),$PHP_MBSTRING_BASE_SOURCES,,shared_objects_mbstring,yes)
+ PHP_ADD_SOURCES_X(PHP_EXT_DIR(mbstring),$PHP_MBSTRING_BASE_SOURCES, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1,shared_objects_mbstring,yes)
if test -f "$ext_builddir/config.h.in"; then
out="$abs_builddir/config.h"
else
diff --git a/ext/mbstring/config.w32 b/ext/mbstring/config.w32
index 6b7e05a329..27a8143686 100644
--- a/ext/mbstring/config.w32
+++ b/ext/mbstring/config.w32
@@ -16,7 +16,7 @@ if (PHP_MBSTRING != "no") {
"-Iext/mbstring/libmbfl -Iext/mbstring/libmbfl/mbfl \
-Iext/mbstring/oniguruma /D NOT_RUBY=1 /D LIBMBFL_EXPORTS=1 \
/D HAVE_STDARG_PROTOTYPES=1 /D HAVE_CONFIG_H /D HAVE_STDLIB_H \
- /D HAVE_STRICMP /D MBFL_DLL_EXPORT=1 /D EXPORT");
+ /D HAVE_STRICMP /D MBFL_DLL_EXPORT=1 /D EXPORT /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
ADD_SOURCES("ext/mbstring/libmbfl/filters", "html_entities.c \
mbfilter_7bit.c mbfilter_ascii.c mbfilter_base64.c mbfilter_big5.c \
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 691391ab92..4cc73423d8 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -597,6 +597,9 @@ static sapi_post_entry php_post_entries[] = {
/* }}} */
#ifdef COMPILE_DL_MBSTRING
+#ifdef ZTS
+ZEND_TSRMLS_CACHE_DEFINE;
+#endif
ZEND_GET_MODULE(mbstring)
#endif
@@ -1491,6 +1494,10 @@ PHP_INI_END()
/* {{{ module global initialize handler */
static PHP_GINIT_FUNCTION(mbstring)
{
+#if defined(COMPILE_DL_MBSTRING) && defined(ZTS)
+ZEND_TSRMLS_CACHE_UPDATE;
+#endif
+
mbstring_globals->language = mbfl_no_language_uni;
mbstring_globals->internal_encoding = NULL;
mbstring_globals->current_internal_encoding = mbstring_globals->internal_encoding;
diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h
index 0136f8ef7d..bc6434f81f 100644
--- a/ext/mbstring/mbstring.h
+++ b/ext/mbstring/mbstring.h
@@ -200,7 +200,8 @@ struct mb_overload_def {
};
#ifdef ZTS
-#define MBSTRG(v) TSRMG(mbstring_globals_id, zend_mbstring_globals *, v)
+#define MBSTRG(v) ZEND_TSRMG(mbstring_globals_id, zend_mbstring_globals *, v)
+ZEND_TSRMLS_CACHE_EXTERN;
#else
#define MBSTRG(v) (mbstring_globals.v)
#endif
diff --git a/ext/pcre/config.w32 b/ext/pcre/config.w32
index 594b1cb474..1fe4b687f6 100644
--- a/ext/pcre/config.w32
+++ b/ext/pcre/config.w32
@@ -2,7 +2,7 @@
// vim:ft=javascript
EXTENSION("pcre", "php_pcre.c", false /* never shared */,
- "-Iext/pcre/pcrelib");
+ "-Iext/pcre/pcrelib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
ADD_SOURCES("ext/pcre/pcrelib", "pcre_chartables.c pcre_ucd.c pcre_compile.c pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c pcre_tables.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c pcre_jit_compile.c", "pcre");
ADD_DEF_FILE("ext\\pcre\\php_pcre.def");
diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4
index bfe2009aa0..3c0875f1af 100644
--- a/ext/pcre/config0.m4
+++ b/ext/pcre/config0.m4
@@ -47,7 +47,7 @@ PHP_ARG_WITH(pcre-regex,,
AC_DEFINE(HAVE_PCRE, 1, [ ])
PHP_ADD_INCLUDE($PCRE_INCDIR)
- PHP_NEW_EXTENSION(pcre, php_pcre.c, no)
+ PHP_NEW_EXTENSION(pcre, php_pcre.c, no, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h])
else
AC_MSG_CHECKING([for PCRE library to use])
@@ -60,7 +60,7 @@ PHP_ARG_WITH(pcre-regex,,
pcrelib/pcre_tables.c pcrelib/pcre_valid_utf8.c \
pcrelib/pcre_version.c pcrelib/pcre_xclass.c \
pcrelib/pcre_jit_compile.c"
- PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib"
+ PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS)
PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h
index cd6621372f..a7d69adbc6 100644
--- a/ext/pcre/php_pcre.h
+++ b/ext/pcre/php_pcre.h
@@ -79,7 +79,7 @@ ZEND_BEGIN_MODULE_GLOBALS(pcre)
ZEND_END_MODULE_GLOBALS(pcre)
#ifdef ZTS
-# define PCRE_G(v) TSRMG(pcre_globals_id, zend_pcre_globals *, v)
+# define PCRE_G(v) ZEND_TSRMG(pcre_globals_id, zend_pcre_globals *, v)
#else
# define PCRE_G(v) (pcre_globals.v)
#endif
diff --git a/ext/reflection/config.m4 b/ext/reflection/config.m4
index 702663677b..334d7dc471 100755
--- a/ext/reflection/config.m4
+++ b/ext/reflection/config.m4
@@ -2,4 +2,4 @@ dnl $Id$
dnl config.m4 for extension reflection
AC_DEFINE(HAVE_REFLECTION, 1, [Whether Reflection is enabled])
-PHP_NEW_EXTENSION(reflection, php_reflection.c, no)
+PHP_NEW_EXTENSION(reflection, php_reflection.c, no, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
diff --git a/ext/reflection/config.w32 b/ext/reflection/config.w32
index 724bf7bde4..2eb33c66ee 100755
--- a/ext/reflection/config.w32
+++ b/ext/reflection/config.w32
@@ -1,6 +1,6 @@
// $Id$
// vim:ft=javascript
-EXTENSION("reflection", "php_reflection.c", false /* never shared */);
+EXTENSION("reflection", "php_reflection.c", false /* never shared */, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE('HAVE_REFLECTION', 1, 'Reflection support enabled');
-PHP_REFLECTION="yes"; \ No newline at end of file
+PHP_REFLECTION="yes";
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 57e11945c1..73da5c0a5e 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -70,7 +70,7 @@ ZEND_END_MODULE_GLOBALS(reflection)
#ifdef ZTS
# define REFLECTION_G(v) \
- TSRMG(reflection_globals_id, zend_reflection_globals*, v)
+ ZEND_TSRMG(reflection_globals_id, zend_reflection_globals*, v)
extern int reflection_globals_id;
#else
# define REFLECTION_G(v) (reflection_globals.v)