summaryrefslogtreecommitdiff
path: root/TSRM/tsrm_win32.c
diff options
context:
space:
mode:
authorShane Caraveo <shane@php.net>2003-02-09 03:49:43 +0000
committerShane Caraveo <shane@php.net>2003-02-09 03:49:43 +0000
commit5048f8c60ea1d2f4c8e945bc151e77620bb1e44b (patch)
tree23572a56f02cabaa49e8c220f9e4e3538eef7f15 /TSRM/tsrm_win32.c
parent086cb15f433893e3a8a0f7ddf42561a45da339ce (diff)
downloadphp-git-5048f8c60ea1d2f4c8e945bc151e77620bb1e44b.tar.gz
is_executable() now available on win32
stats can now get information provided by access()
Diffstat (limited to 'TSRM/tsrm_win32.c')
-rw-r--r--TSRM/tsrm_win32.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index 46365b5fc1..dccf86e851 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -81,6 +81,17 @@ TSRM_API void tsrm_win32_shutdown(void)
#endif
}
+TSRM_API int tsrm_win32_access(const char *pathname, int mode)
+{
+ SHFILEINFO sfi;
+ if (mode == 1 /*X_OK*/)
+ return access(pathname, 0)==0 &&
+ SHGetFileInfo(pathname,0,&sfi,sizeof(SHFILEINFO),SHGFI_EXETYPE)!=0?0:-1;
+ else
+ return access(pathname, mode);
+}
+
+
static process_pair *process_get(FILE *stream TSRMLS_DC)
{
process_pair *ptr;