You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
849 B

X-Git-Url: http://72.52.91.13:8000/?p=php-src.git;a=blobdiff_plain;f=main%2Fphp_open_temporary_file.c;h=7fe28cf38b40e10d330bca449999555c5c6b00b3;hp=260024625b736f5e08ed703d5bdfa13f3605d88f;hb=ce5c4500cd942ab85efa1e916ef00de860be9e6e;hpb=daa0abaf77d9be8c2a8af1c9f6d29b749802f2e1
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)
{