diff options
author | Shane Caraveo <shane@php.net> | 2003-02-09 03:49:43 +0000 |
---|---|---|
committer | Shane Caraveo <shane@php.net> | 2003-02-09 03:49:43 +0000 |
commit | 5048f8c60ea1d2f4c8e945bc151e77620bb1e44b (patch) | |
tree | 23572a56f02cabaa49e8c220f9e4e3538eef7f15 /TSRM/tsrm_virtual_cwd.h | |
parent | 086cb15f433893e3a8a0f7ddf42561a45da339ce (diff) | |
download | php-git-5048f8c60ea1d2f4c8e945bc151e77620bb1e44b.tar.gz |
is_executable() now available on win32
stats can now get information provided by access()
Diffstat (limited to 'TSRM/tsrm_virtual_cwd.h')
-rw-r--r-- | TSRM/tsrm_virtual_cwd.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index d77e8f8166..d001a20e4d 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -150,9 +150,21 @@ CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC); CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC); CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC); CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC); - -#if !defined(TSRM_WIN32) CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC); +#if defined(TSRM_WIN32) +/* these are not defined in win32 headers */ +#ifndef W_OK +#define W_OK 0x02 +#endif +#ifndef R_OK +#define R_OK 0x04 +#endif +#ifndef X_OK +#define X_OK 0x01 +#endif +#ifndef F_OK +#define F_OK 0x00 +#endif #endif #if HAVE_UTIME @@ -231,7 +243,11 @@ typedef struct _virtual_cwd_globals { #define VCWD_RMDIR(pathname) rmdir(pathname) #define VCWD_OPENDIR(pathname) opendir(pathname) #define VCWD_POPEN(command, type) popen(command, type) +#if defined(TSRM_WIN32) +#define VCWD_ACCESS(pathname, mode) tsrm_win32_access(pathname, mode) +#else #define VCWD_ACCESS(pathname, mode) access(pathname, mode) +#endif #ifdef HAVE_REALPATH #define VCWD_REALPATH(path, real_path) realpath(path, real_path) |