From: Zeev Suraski Date: Mon, 17 Feb 2003 13:27:15 +0000 (+0000) Subject: More Win32 build improvements X-Git-Tag: RELEASE_0_5~940 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb607799cc3aa512136e9c8ec480c043050e5aeb;p=php More Win32 build improvements --- diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index 14c5873179..0fcd5c221a 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -37,6 +37,9 @@ #ifdef ZTS #ifdef TSRM_WIN32 +# ifndef TSRM_INCLUDE_FULL_WINDOWS_HEADERS +# define WIN32_LEAN_AND_MEAN +# endif # include #elif defined(NETWARE) # include diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 00efb9136e..0cffe4722a 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -24,6 +24,8 @@ #include #include +#define TSRM_INCLUDE_FULL_WINDOWS_HEADERS + #include "TSRM.h" #ifdef TSRM_WIN32 @@ -84,6 +86,7 @@ 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*/) { return access(pathname, 0) == 0 && SHGetFileInfo(pathname, 0, &sfi, sizeof(SHFILEINFO), SHGFI_EXETYPE) != 0 ? 0 : -1;