diff options
author | Dmitry Stogov <dmitry@php.net> | 2006-11-10 15:04:07 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2006-11-10 15:04:07 +0000 |
commit | ce958eded56ddb44d9d362a5b4d007543b6c82bc (patch) | |
tree | 801652e6ea19cff8a1ee131c240ced95717e54ff /TSRM/tsrm_virtual_cwd.h | |
parent | 40d3abba416d9db2a42bc7ecac8b2a85d5199663 (diff) | |
download | php-git-ce958eded56ddb44d9d362a5b4d007543b6c82bc.tar.gz |
stat() is reimplemented using using GetFileAttributesEx().
The new implementation is faster then implementation in MS VC CRT, but it doesn't support Windows 95.
Diffstat (limited to 'TSRM/tsrm_virtual_cwd.h')
-rw-r--r-- | TSRM/tsrm_virtual_cwd.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index 9bb8b0f68a..f15fae26ec 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -126,6 +126,12 @@ typedef unsigned short mode_t; #define CWD_API #endif +#ifdef TSRM_WIN32 +CWD_API int php_sys_stat(const char *path, struct stat *buf); +#else +# define php_sys_stat stat +#endif + typedef struct _cwd_state { char *cwd; int cwd_length; @@ -263,7 +269,7 @@ extern virtual_cwd_globals cwd_globals; #define VCWD_CHDIR(path) chdir(path) #define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, chdir) #define VCWD_GETWD(buf) getwd(buf) -#define VCWD_STAT(path, buff) stat(path, buff) +#define VCWD_STAT(path, buff) php_sys_stat(path, buff) #define VCWD_LSTAT(path, buff) lstat(path, buff) #define VCWD_UNLINK(path) unlink(path) #define VCWD_MKDIR(pathname, mode) mkdir(pathname, mode) |