php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #70002
Patch temp_dir_ts_4 revision 2015-07-28 14:40 UTC by ab@php.net
Patch temp_dir_ts_3 revision 2015-07-28 08:51 UTC by ab@php.net
Patch temp_dir_ts_2 revision 2015-07-28 08:40 UTC by ab@php.net
Patch temporary_dir_ts revision 2015-07-27 16:28 UTC by ab@php.net

Patch temp_dir_ts_4 for Apache2 related Bug #70002

Patch version 2015-07-28 14:40 UTC

Return to Bug #70002 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: ab@php.net

diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c
index 2600246..7fe28cf 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)
 {
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC