com php-src: - Fixed ZTS build: main/php_open_temporary_f ile.c
| From: | Felipe Pena | Date: | Tue, 29 Jan 2013 11:26:54 +0000 |
| Subject: | com php-src: - Fixed ZTS build: main/php_open_temporary_f ile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-71059@lists.php.net to get a copy of this message | ||
Commit: 37c304b5db16fcf402ec00d7c8c4a228c4b5cdc4
Author: Felipe Pena <felipensp@gmail.com> Tue, 29 Jan 2013 09:26:54 -0200
Parents: 489073b501473fc8d7b21fed8eb72c55e0abee80
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=37c304b5db16fcf402ec00d7c8c4a228c4b5cdc4
Log:
- Fixed ZTS build
Changed paths:
M main/php_open_temporary_file.c
Diff:
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c
index 5d5e5b9..054d497 100644
--- a/main/php_open_temporary_file.c
+++ b/main/php_open_temporary_file.c
@@ -189,7 +189,7 @@ PHPAPI void php_shutdown_temporary_directory(void)
/*
* Determine where to place temporary files.
*/
-PHPAPI const char* php_get_temporary_directory(void)
+PHPAPI const char* php_get_temporary_directory(TSRMLS_D)
{
/* Did we determine the temporary directory already? */
if (temporary_directory) {
@@ -278,7 +278,7 @@ PHPAPI int php_open_temporary_fd_ex(const char *dir, const char *pfx, char **ope
if (!dir || *dir == '\0') {
def_tmp:
- temp_dir = php_get_temporary_directory();
+ temp_dir = php_get_temporary_directory(TSRMLS_C);
if (temp_dir && *temp_dir != '\0' && (!open_basedir_check ||
!php_check_open_basedir(temp_dir TSRMLS_CC))) {
return php_do_open_temporary_file(temp_dir, pfx, opened_path_p TSRMLS_CC);
@@ -309,12 +309,12 @@ PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char
**op
if (fd == -1) {
return NULL;
}
-
+
fp = fdopen(fd, "r+b");
if (fp == NULL) {
close(fd);
}
-
+
return fp;
}
/* }}} */