From f14dc0519c8d87e8fa18920a86bf8dee42e2b502 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 28 Jul 2015 17:42:37 +0200 Subject: [PATCH] Merge branch 'PHP-5.5' into PHP-5.6 * PHP-5.5: Fixed bug #70002 TS issues with temporary dir handling --- main/php_open_temporary_file.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index a18adaa8cd..cbfecca0be 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -176,7 +176,15 @@ static int php_do_open_temporary_file(const char *path, const char *pfx, char ** /* }}} */ /* Cache the chosen temporary directory. */ -static char* temporary_directory; +static +#ifdef ZTS +#ifdef PHP_WIN32 +__declspec(thread) +#elif defined(__GNUC__) +__thread +#endif +#endif +char* temporary_directory; PHPAPI void php_shutdown_temporary_directory(void) {