Skip to content

Commit 9fdb8c2

Browse files
committed
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Fixed bug #70002 TS issues with temporary dir handling
2 parents 54bf635 + ce5c450 commit 9fdb8c2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

main/php_open_temporary_file.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,15 @@ static int php_do_open_temporary_file(const char *path, const char *pfx, char **
176176
/* }}} */
177177

178178
/* Cache the chosen temporary directory. */
179-
static char* temporary_directory;
179+
static
180+
#ifdef ZTS
181+
#ifdef PHP_WIN32
182+
__declspec(thread)
183+
#elif defined(__GNUC__)
184+
__thread
185+
#endif
186+
#endif
187+
char* temporary_directory;
180188

181189
PHPAPI void php_shutdown_temporary_directory(void)
182190
{

0 commit comments

Comments
 (0)