summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TSRM/TSRM.h3
-rw-r--r--TSRM/tsrm_win32.c3
2 files changed, 6 insertions, 0 deletions
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 <windows.h>
#elif defined(NETWARE)
# include <nks/thread.h>
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 <process.h>
#include <time.h>
+#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;