File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ if test "$BUILD_PHPDBG" == "" && test "$PHP_PHPDBG" != "no"; then
21
21
AC_DEFINE ( PHPDBG_DEBUG , 0 , [ ] )
22
22
fi
23
23
24
- PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE"
24
+ PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 "
25
25
PHP_PHPDBG_FILES="phpdbg.c phpdbg_parser.c phpdbg_lexer.c phpdbg_prompt.c phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c phpdbg_info.c phpdbg_cmd.c phpdbg_set.c phpdbg_frame.c phpdbg_watch.c phpdbg_btree.c phpdbg_sigsafe.c phpdbg_wait.c phpdbg_io.c phpdbg_eol.c phpdbg_out.c"
26
26
27
27
if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then
Original file line number Diff line number Diff line change @@ -9,9 +9,10 @@ PHPDBG_SOURCES='phpdbg.c phpdbg_prompt.c phpdbg_cmd.c phpdbg_info.c phpdbg_help.
9
9
'phpdbg_sigio_win32.c phpdbg_eol.c phpdbg_out.c';
10
10
PHPDBG_DLL='php' + PHP_VERSION + 'phpdbg.dll';
11
11
PHPDBG_EXE='phpdbg.exe';
12
+ PHPDBG_CFLAGS='/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1';
12
13
13
14
if (PHP_PHPDBG == "yes") {
14
- SAPI('phpdbg', PHPDBG_SOURCES, PHPDBG_EXE);
15
+ SAPI('phpdbg', PHPDBG_SOURCES, PHPDBG_EXE, PHPDBG_CFLAGS );
15
16
ADD_FLAG("LIBS_PHPDBG", "ws2_32.lib user32.lib");
16
17
ADD_FLAG("CFLAGS_PHPDBG", "/D YY_NO_UNISTD_H");
17
18
ADD_FLAG("LDFLAGS_PHPDBG", "/stack:8388608");
Original file line number Diff line number Diff line change 52
52
# include "openssl/applink.c"
53
53
#endif
54
54
55
+ #if defined(PHP_WIN32 ) && defined(ZTS )
56
+ ZEND_TSRMLS_CACHE_DEFINE ();
57
+ #endif
58
+
55
59
ZEND_DECLARE_MODULE_GLOBALS (phpdbg );
56
60
int phpdbg_startup_run = 0 ;
57
61
@@ -1312,10 +1316,6 @@ int main(int argc, char **argv) /* {{{ */
1312
1316
zend_bool is_exit ;
1313
1317
int exit_status ;
1314
1318
1315
- #ifdef ZTS
1316
- void * * * tsrm_ls ;
1317
- #endif
1318
-
1319
1319
#ifndef _WIN32
1320
1320
struct sigaction sigio_struct ;
1321
1321
struct sigaction signal_struct ;
@@ -1338,8 +1338,8 @@ int main(int argc, char **argv) /* {{{ */
1338
1338
1339
1339
#ifdef ZTS
1340
1340
tsrm_startup (1 , 1 , 0 , NULL );
1341
-
1342
- tsrm_ls = ts_resource ( 0 );
1341
+ ( void * ) ts_resource ( 0 );
1342
+ ZEND_TSRMLS_CACHE_UPDATE ( );
1343
1343
#endif
1344
1344
1345
1345
#ifdef ZEND_SIGNALS
@@ -1608,7 +1608,7 @@ int main(int argc, char **argv) /* {{{ */
1608
1608
1609
1609
if (settings > (zend_phpdbg_globals * ) 0x2 ) {
1610
1610
#ifdef ZTS
1611
- * ((zend_phpdbg_globals * ) (* ((void * * * ) tsrm_ls ))[TSRM_UNSHUFFLE_RSRC_ID (phpdbg_globals_id )]) = * settings ;
1611
+ * ((zend_phpdbg_globals * ) (* ((void * * * ) TSRMLS_CACHE ))[TSRM_UNSHUFFLE_RSRC_ID (phpdbg_globals_id )]) = * settings ;
1612
1612
#else
1613
1613
phpdbg_globals = * settings ;
1614
1614
#endif
You can’t perform that action at this time.
0 commit comments