summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/php_open_temporary_file.c4
-rw-r--r--main/php_open_temporary_file.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c
index a3db16deb6..b8c94528cd 100644
--- a/main/php_open_temporary_file.c
+++ b/main/php_open_temporary_file.c
@@ -164,7 +164,7 @@ static int php_do_open_temporary_file(const char *path, const char *pfx, char **
/*
* Determine where to place temporary files.
*/
-const char* get_temporary_directory()
+PHPAPI const char* php_get_temporary_directory(void)
{
/* Cache the chosen temporary directory. */
static char* temporary_directory;
@@ -231,7 +231,7 @@ PHPAPI int php_open_temporary_fd(const char *dir, const char *pfx, char **opened
fd = php_do_open_temporary_file(dir, pfx, opened_path_p TSRMLS_CC);
if (fd == -1) {
/* Use default temporary directory. */
- fd = php_do_open_temporary_file(get_temporary_directory(), pfx, opened_path_p TSRMLS_CC);
+ fd = php_do_open_temporary_file(php_get_temporary_directory(), pfx, opened_path_p TSRMLS_CC);
}
return fd;
}
diff --git a/main/php_open_temporary_file.h b/main/php_open_temporary_file.h
index db1c5f8493..500d2429c3 100644
--- a/main/php_open_temporary_file.h
+++ b/main/php_open_temporary_file.h
@@ -24,6 +24,7 @@
BEGIN_EXTERN_C()
PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC);
PHPAPI int php_open_temporary_fd(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC);
+PHPAPI const char *php_get_temporary_directory(void);
END_EXTERN_C()
#endif /* PHP_OPEN_TEMPORARY_FILE_H */