diff options
| author | Andi Gutmans <andi@php.net> | 2000-06-12 19:39:04 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2000-06-12 19:39:04 +0000 |
| commit | 719d995a9df436998c5c1e22ec150a8e4c0d1d4f (patch) | |
| tree | 1baa2e75a0e5b3f40f8e57738e694f959be008ca /main/php.h | |
| parent | 5d514525459ac6fe86d480ca97d6eadcfdd2ce95 (diff) | |
| download | php-git-719d995a9df436998c5c1e22ec150a8e4c0d1d4f.tar.gz | |
- On UNIX support popen() which works with current working directory
- when in VIRTUAL_DIR mode.
Diffstat (limited to 'main/php.h')
| -rw-r--r-- | main/php.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/main/php.h b/main/php.h index 7f692ca19d..ef79abba16 100644 --- a/main/php.h +++ b/main/php.h @@ -289,6 +289,7 @@ PHPAPI int cfg_get_string(char *varname, char **result); /* Virtual current directory support */ #ifdef VIRTUAL_DIR + #define V_GETCWD(buff, size) virtual_getcwd(buff,size) #define V_FOPEN(path, mode) virtual_fopen(path, mode) /* The V_OPEN macro will need to be used as V_OPEN((path, flags, ...)) */ @@ -307,8 +308,15 @@ PHPAPI int cfg_get_string(char *varname, char **result); #define V_MKDIR(pathname, mode) virtual_mkdir(pathname, mode) #define V_RMDIR(pathname) virtual_rmdir(pathname) #define V_OPENDIR(pathname) virtual_opendir(pathname) +#ifdef PHP_WIN32 +/* Under Windows the "cd /cwd ; command" trick doesn't work */ +#define V_POPEN(command, type) popen(command, type) +#else #define V_POPEN(command, type) virtual_popen(command, type) +#endif + #else + #define V_GETCWD(buff, size) getcwd(buff,size) #define V_FOPEN(path, mode) fopen(path, mode) #define V_OPEN(open_args) open open_args @@ -323,6 +331,7 @@ PHPAPI int cfg_get_string(char *varname, char **result); #define V_RMDIR(pathname) rmdir(pathname) #define V_OPENDIR(pathname) opendir(pathname) #define V_POPEN(command, type) popen(command, type) + #endif #include "zend_constants.h" |
