]> granicus.if.org Git - php/commitdiff
emoved dependency from SHELL32.DLL
authorDmitry Stogov <dmitry@php.net>
Thu, 21 Dec 2006 09:04:58 +0000 (09:04 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 21 Dec 2006 09:04:58 +0000 (09:04 +0000)
TSRM/tsrm_virtual_cwd.c
TSRM/tsrm_win32.c

index bd350689d37b5e0ac00350292b854b5213bad990..f52790dfd5e40516ee46c224bda27e4ab9094027 100644 (file)
 #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
index a87cf177fa146888e9519f14d2a9a8d4ef453a93..0552b034d2d267751725e80ce30d916cc74520dc 100644 (file)
@@ -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);
        }