diff options
Diffstat (limited to 'main/php_open_temporary_file.h')
-rw-r--r-- | main/php_open_temporary_file.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/php_open_temporary_file.h b/main/php_open_temporary_file.h index deb8e240e5..41056a2756 100644 --- a/main/php_open_temporary_file.h +++ b/main/php_open_temporary_file.h @@ -17,8 +17,16 @@ #ifndef PHP_OPEN_TEMPORARY_FILE_H #define PHP_OPEN_TEMPORARY_FILE_H -#define PHP_TMP_FILE_OPEN_BASEDIR_CHECK (1<<0) +#define PHP_TMP_FILE_DEFAULT 0 +#define PHP_TMP_FILE_OPEN_BASEDIR_CHECK_ON_FALLBACK (1<<0) #define PHP_TMP_FILE_SILENT (1<<1) +#define PHP_TMP_FILE_OPEN_BASEDIR_CHECK_ON_EXPLICIT_DIR (1<<2) +#define PHP_TMP_FILE_OPEN_BASEDIR_CHECK_ALWAYS \ + (PHP_TMP_FILE_OPEN_BASEDIR_CHECK_ON_FALLBACK | PHP_TMP_FILE_OPEN_BASEDIR_CHECK_ON_EXPLICIT_DIR) + +/* for compatibility purpose */ +#define PHP_TMP_FILE_OPEN_BASEDIR_CHECK PHP_TMP_FILE_OPEN_BASEDIR_CHECK_ON_FALLBACK + BEGIN_EXTERN_C() PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, zend_string **opened_path_p); |