Skip to content

Commit aff66a9

Browse files
committed
don't define tsrm ls in SAPIs under linux
as it's compiled statically with the core
1 parent 8aeffdd commit aff66a9

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

sapi/apache2handler/sapi_apache2.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171

7272
/* A way to specify the location of the php.ini dir in an apache directive */
7373
char *apache2_php_ini_path_override = NULL;
74-
#ifdef ZTS
74+
#if defined(PHP_WIN32) && defined(ZTS)
7575
ZEND_TSRMLS_CACHE_DEFINE;
7676
#endif
7777

sapi/cgi/cgi_main.c

+2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ static void user_config_cache_entry_dtor(zval *el)
199199
#ifdef ZTS
200200
static int php_cgi_globals_id;
201201
#define CGIG(v) ZEND_TSRMG(php_cgi_globals_id, php_cgi_globals_struct *, v)
202+
#if defined(PHP_WIN32)
202203
ZEND_TSRMLS_CACHE_DEFINE;
204+
#endif
203205
#else
204206
static php_cgi_globals_struct php_cgi_globals;
205207
#define CGIG(v) (php_cgi_globals.v)

sapi/cli/php_cli.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ PHPAPI extern char *php_ini_opened_path;
9999
PHPAPI extern char *php_ini_scanned_path;
100100
PHPAPI extern char *php_ini_scanned_files;
101101

102-
#ifdef ZTS
102+
#if defined(PHP_WIN32) && defined(ZTS)
103103
ZEND_TSRMLS_CACHE_DEFINE;
104104
#endif
105105

0 commit comments

Comments
 (0)