summaryrefslogtreecommitdiff
path: root/ext/pcntl/php_pcntl.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcntl/php_pcntl.h')
-rw-r--r--ext/pcntl/php_pcntl.h9
1 files changed, 5 insertions, 4 deletions
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 */