diff options
author | Anatol Belski <ab@php.net> | 2014-10-17 15:51:21 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-10-17 15:51:21 +0200 |
commit | 4fce2ae2c64b61e5ef7cdbdb631b8d5691d1b31f (patch) | |
tree | c1e4941189f82e6575fb57de7b0d047404fd0a38 /ext/exif | |
parent | 5749b4a9979cd3ff85996323bed9adc1bd182f76 (diff) | |
download | php-git-4fce2ae2c64b61e5ef7cdbdb631b8d5691d1b31f.tar.gz |
opcache, intl, gmp, exif, com, bcmath to use static tsrmls
Diffstat (limited to 'ext/exif')
-rw-r--r-- | ext/exif/config.m4 | 2 | ||||
-rw-r--r-- | ext/exif/config.w32 | 2 | ||||
-rw-r--r-- | ext/exif/exif.c | 8 |
3 files changed, 9 insertions, 3 deletions
diff --git a/ext/exif/config.m4 b/ext/exif/config.m4 index a3ba9240df..8a3a0d43c2 100644 --- a/ext/exif/config.m4 +++ b/ext/exif/config.m4 @@ -7,5 +7,5 @@ PHP_ARG_ENABLE(exif, whether to enable EXIF (metadata from images) support, if test "$PHP_EXIF" != "no"; then AC_DEFINE(HAVE_EXIF, 1, [Whether you want EXIF (metadata from images) support]) - PHP_NEW_EXTENSION(exif, exif.c, $ext_shared) + PHP_NEW_EXTENSION(exif, exif.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) fi diff --git a/ext/exif/config.w32 b/ext/exif/config.w32 index 38466c809c..595e71bda0 100644 --- a/ext/exif/config.w32 +++ b/ext/exif/config.w32 @@ -5,7 +5,7 @@ ARG_ENABLE("exif", "exif", "no"); if (PHP_EXIF == "yes") { if (ADD_EXTENSION_DEP('exif', 'mbstring')) { - EXTENSION("exif", "exif.c"); + EXTENSION("exif", "exif.c", null, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); AC_DEFINE('HAVE_EXIF', 1, 'Have exif'); } else { WARNING("exif support can't be enabled, libxml is not enabled") diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 06e1dae41a..5d00672c5c 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -156,7 +156,10 @@ ZEND_END_MODULE_GLOBALS(exif) ZEND_DECLARE_MODULE_GLOBALS(exif) #ifdef ZTS -#define EXIF_G(v) TSRMG(exif_globals_id, zend_exif_globals *, v) +#define EXIF_G(v) ZEND_TSRMG(exif_globals_id, zend_exif_globals *, v) +#ifdef COMPILE_DL_EXIF +ZEND_TSRMLS_CACHE_DEFINE; +#endif #else #define EXIF_G(v) (exif_globals.v) #endif @@ -208,6 +211,9 @@ PHP_INI_END() */ static PHP_GINIT_FUNCTION(exif) { +#if defined(COMPILE_DL_EXIF) && defined(ZTS) + ZEND_TSRMLS_CACHE_UPDATE; +#endif exif_globals->encode_unicode = NULL; exif_globals->decode_unicode_be = NULL; exif_globals->decode_unicode_le = NULL; |