summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r--ext/standard/basic_functions.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 6fd7d04915..edb2200a0b 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -35,6 +35,10 @@
#include "ext/standard/dns.h"
#include "ext/standard/php_uuencode.h"
+#ifdef PHP_WIN32
+#include "win32/php_win32_globals.h"
+#endif
+
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#include "zend.h"
@@ -1005,8 +1009,14 @@ PHP_MINIT_FUNCTION(basic)
{
#ifdef ZTS
ts_allocate_id(&basic_globals_id, sizeof(php_basic_globals), (ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor);
+#ifdef PHP_WIN32
+ ts_allocate_id(&php_win32_core_globals_id, sizeof(php_win32_core_globals), (ts_allocate_ctor)php_win32_core_globals_ctor, NULL);
+#endif
#else
basic_globals_ctor(&basic_globals TSRMLS_CC);
+#ifdef PHP_WIN32
+ php_win32_core_globals_ctor(&php_win32_core_globals TSRMLS_CC);
+#endif
#endif
REGISTER_LONG_CONSTANT("CONNECTION_ABORTED", PHP_CONNECTION_ABORTED, CONST_CS | CONST_PERSISTENT);
@@ -1105,6 +1115,9 @@ PHP_MSHUTDOWN_FUNCTION(basic)
{
#ifdef ZTS
ts_free_id(basic_globals_id);
+#ifdef PHP_WIN32
+ ts_free_id(php_win32_core_globals_id);
+#endif
#else
basic_globals_dtor(&basic_globals TSRMLS_CC);
#endif
@@ -1214,6 +1227,7 @@ PHP_RSHUTDOWN_FUNCTION(basic)
PHP_RSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
PHP_RSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
PHP_RSHUTDOWN(streams)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
+ PHP_RSHUTDOWN(win32_core_globals)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
if (BG(user_tick_functions)) {
zend_llist_destroy(BG(user_tick_functions));