diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | TSRM/tsrm_virtual_cwd.c | 5 | ||||
-rw-r--r-- | TSRM/tsrm_win32.c | 12 |
3 files changed, 11 insertions, 7 deletions
@@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Dec 2006, PHP 5.2.1RC2 +- Removed dependency from SHELL32.DLL. (Dmitry) - Added function stream_socket_shutdown(). It is a wraper for system shutdown() function, that shut downs part of a full-duplex connection. (Dmitry) - Added internal heap protection (Dmitry) 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); } |