AC_DEFINE(PHPDBG_DEBUG, 0, [ ])
fi
- PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE"
+ PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
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"
if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then
'phpdbg_sigio_win32.c phpdbg_eol.c phpdbg_out.c';
PHPDBG_DLL='php' + PHP_VERSION + 'phpdbg.dll';
PHPDBG_EXE='phpdbg.exe';
+PHPDBG_CFLAGS='/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1';
if (PHP_PHPDBG == "yes") {
- SAPI('phpdbg', PHPDBG_SOURCES, PHPDBG_EXE);
+ SAPI('phpdbg', PHPDBG_SOURCES, PHPDBG_EXE, PHPDBG_CFLAGS);
ADD_FLAG("LIBS_PHPDBG", "ws2_32.lib user32.lib");
ADD_FLAG("CFLAGS_PHPDBG", "/D YY_NO_UNISTD_H");
ADD_FLAG("LDFLAGS_PHPDBG", "/stack:8388608");
# include "openssl/applink.c"
#endif
+#if defined(PHP_WIN32) && defined(ZTS)
+ZEND_TSRMLS_CACHE_DEFINE();
+#endif
+
ZEND_DECLARE_MODULE_GLOBALS(phpdbg);
int phpdbg_startup_run = 0;
zend_bool is_exit;
int exit_status;
-#ifdef ZTS
- void ***tsrm_ls;
-#endif
-
#ifndef _WIN32
struct sigaction sigio_struct;
struct sigaction signal_struct;
#ifdef ZTS
tsrm_startup(1, 1, 0, NULL);
-
- tsrm_ls = ts_resource(0);
+ (void*)ts_resource(0);
+ ZEND_TSRMLS_CACHE_UPDATE();
#endif
#ifdef ZEND_SIGNALS
if (settings > (zend_phpdbg_globals *) 0x2) {
#ifdef ZTS
- *((zend_phpdbg_globals *) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(phpdbg_globals_id)]) = *settings;
+ *((zend_phpdbg_globals *) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(phpdbg_globals_id)]) = *settings;
#else
phpdbg_globals = *settings;
#endif