summaryrefslogtreecommitdiff
path: root/TSRM/tsrm_win32.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-12-21 09:01:10 +0000
committerDmitry Stogov <dmitry@php.net>2006-12-21 09:01:10 +0000
commit91dc80ba9ab91a7150850dc5604b62a056742fa3 (patch)
tree65cf912a95f9543af523b51d33927f95e71cf197 /TSRM/tsrm_win32.c
parent5ead613386da7b194dc59fcca19631ab8597422c (diff)
downloadphp-git-91dc80ba9ab91a7150850dc5604b62a056742fa3.tar.gz
Removed dependency from SHELL32.DLL
Diffstat (limited to 'TSRM/tsrm_win32.c')
-rw-r--r--TSRM/tsrm_win32.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index a87cf177fa..0552b034d2 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -86,11 +86,19 @@ TSRM_API void tsrm_win32_shutdown(void)
TSRM_API int tsrm_win32_access(const char *pathname, int mode)
{
- SHFILEINFO sfi;
-
if (mode == 1 /*X_OK*/) {
+#if 1
+ /* This code is not supported by Windows 98,
+ * but we don't support it anymore */
+ DWORD type;
+
+ return GetBinaryType(pathname, &type)?0:-1;
+#else
+ SHFILEINFO sfi;
+
return access(pathname, 0) == 0 &&
SHGetFileInfo(pathname, 0, &sfi, sizeof(SHFILEINFO), SHGFI_EXETYPE) != 0 ? 0 : -1;
+#endif
} else {
return access(pathname, mode);
}