summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/odbc')
-rw-r--r--ext/odbc/php_odbc_includes.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h
index 832c65da3e..9d8799c5fb 100644
--- a/ext/odbc/php_odbc_includes.h
+++ b/ext/odbc/php_odbc_includes.h
@@ -296,14 +296,11 @@ void odbc_sql_error(ODBC_SQL_ERROR_PARAMS);
#endif
#define IS_SQL_BINARY(x) (x == SQL_BINARY || x == SQL_VARBINARY || x == SQL_LONGVARBINARY)
-#ifdef ZTS
-# define ODBCG(v) ZEND_TSRMG(odbc_globals_id, zend_odbc_globals *, v)
-# ifdef COMPILE_DL_ODBC
+PHPAPI ZEND_EXTERN_MODULE_GLOBALS(odbc)
+#define ODBCG(v) ZEND_MODULE_GLOBALS_ACCESSOR(odbc, v)
+
+#if defined(ZTS) && defined(COMPILE_DL_ODBC)
ZEND_TSRMLS_CACHE_EXTERN();
-# endif
-#else
-# define ODBCG(v) (odbc_globals.v)
-extern ZEND_API zend_odbc_globals odbc_globals;
#endif
#endif /* HAVE_UODBC */