From 9cd6e9fa964e11ad35366293b9879c94c7ae9618 Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Wed, 29 Jul 2015 06:40:40 +0100 Subject: [PATCH] fix skeleton files for ZTS shared modules --- lib/PHPCompiler/Backend/PHP7/templates/module.c.php | 3 +++ lib/PHPCompiler/Backend/PHP7/templates/module.m4.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/PHPCompiler/Backend/PHP7/templates/module.c.php b/lib/PHPCompiler/Backend/PHP7/templates/module.c.php index fd685f5..dd68c34 100644 --- a/lib/PHPCompiler/Backend/PHP7/templates/module.c.php +++ b/lib/PHPCompiler/Backend/PHP7/templates/module.c.php @@ -272,5 +272,8 @@ #ifdef COMPILE_DL_ +#ifdef ZTS + ZEND_TSRMLS_CACHE_DEFINE(); +#endif ZEND_GET_MODULE() #endif diff --git a/lib/PHPCompiler/Backend/PHP7/templates/module.m4.php b/lib/PHPCompiler/Backend/PHP7/templates/module.m4.php index 88d75df..f05477e 100644 --- a/lib/PHPCompiler/Backend/PHP7/templates/module.m4.php +++ b/lib/PHPCompiler/Backend/PHP7/templates/module.m4.php @@ -11,5 +11,5 @@ AC_MSG_RESULT([supported ($PHP__FOUND_VERSION)]) fi AC_DEFINE(HAVE_, 1, [Compile with support]) - PHP_NEW_EXTENSION(, .c, $ext_shared) -fi \ No newline at end of file + PHP_NEW_EXTENSION(, .c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) +fi