summaryrefslogtreecommitdiff
path: root/ext/posix/php_posix.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-03-12 14:15:47 +0300
committerDmitry Stogov <dmitry@zend.com>2019-03-12 14:15:47 +0300
commitf1b306fe117cfbbe69ab4ef9713d39ea068e74c0 (patch)
tree876485fc86d30924b161cd623919ddfc11a5c69a /ext/posix/php_posix.h
parent5aa1176238f41097ea7295ba6911aa19ae7c1021 (diff)
downloadphp-git-f1b306fe117cfbbe69ab4ef9713d39ea068e74c0.tar.gz
Switch to use ZTS cache
Diffstat (limited to 'ext/posix/php_posix.h')
-rw-r--r--ext/posix/php_posix.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/posix/php_posix.h b/ext/posix/php_posix.h
index 7fff314be2..17d8b038c2 100644
--- a/ext/posix/php_posix.h
+++ b/ext/posix/php_posix.h
@@ -125,12 +125,13 @@ ZEND_BEGIN_MODULE_GLOBALS(posix)
int last_error;
ZEND_END_MODULE_GLOBALS(posix)
-#ifdef ZTS
-# define POSIX_G(v) TSRMG(posix_globals_id, zend_posix_globals *, v)
-#else
-# define POSIX_G(v) (posix_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_POSIX)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
+ZEND_EXTERN_MODULE_GLOBALS(posix)
+#define POSIX_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(posix, v)
+
#else
#define posix_module_ptr NULL