summaryrefslogtreecommitdiff
path: root/TSRM
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
parent5ead613386da7b194dc59fcca19631ab8597422c (diff)
downloadphp-git-91dc80ba9ab91a7150850dc5604b62a056742fa3.tar.gz
Removed dependency from SHELL32.DLL
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_virtual_cwd.c5
-rw-r--r--TSRM/tsrm_win32.c12
2 files changed, 10 insertions, 7 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index bd350689d3..f52790dfd5 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -35,11 +35,6 @@
#ifdef TSRM_WIN32
#include <io.h>
#include "tsrm_win32.h"
-# if HAVE_NEWAPIS_H
-# define WANT_GETLONGPATHNAME_WRAPPER
-# define COMPILE_NEWAPIS_STUBS
-# include <NewAPIs.h>
-# endif
#endif
#ifdef NETWARE
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);
}