From f1b306fe117cfbbe69ab4ef9713d39ea068e74c0 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 12 Mar 2019 14:15:47 +0300 Subject: Switch to use ZTS cache --- ext/pcntl/php_pcntl.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ext/pcntl/php_pcntl.h') diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h index 3a91233754..90ce2aea96 100644 --- a/ext/pcntl/php_pcntl.h +++ b/ext/pcntl/php_pcntl.h @@ -91,12 +91,13 @@ ZEND_BEGIN_MODULE_GLOBALS(pcntl) zend_bool async_signals; ZEND_END_MODULE_GLOBALS(pcntl) -#ifdef ZTS -#define PCNTL_G(v) TSRMG(pcntl_globals_id, zend_pcntl_globals *, v) -#else -#define PCNTL_G(v) (pcntl_globals.v) +#if defined(ZTS) && defined(COMPILE_DL_PCNTL) +ZEND_TSRMLS_CACHE_EXTERN() #endif +ZEND_EXTERN_MODULE_GLOBALS(pcntl) +#define PCNTL_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(pcntl, v) + #define REGISTER_PCNTL_ERRNO_CONSTANT(name) REGISTER_LONG_CONSTANT("PCNTL_" #name, name, CONST_CS | CONST_PERSISTENT) #endif /* PHP_PCNTL_H */ -- cgit v1.2.1