summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-07-28 17:42:37 +0200
committerFerenc Kovacs <tyrael@php.net>2015-08-06 09:23:18 +0200
commitf14dc0519c8d87e8fa18920a86bf8dee42e2b502 (patch)
treec80d8e0f2363dae88fec0598fa9f339ca74babff
parentbbc213d3cf5488fdd79caddd76ebf2af10f4ac85 (diff)
downloadphp-git-f14dc0519c8d87e8fa18920a86bf8dee42e2b502.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Fixed bug #70002 TS issues with temporary dir handling
-rw-r--r--main/php_open_temporary_file.c10
1 files changed, 9 insertions, 1 deletions
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)
{