aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jim-win32.c9
-rw-r--r--jim-win32compat.h6
2 files changed, 12 insertions, 3 deletions
diff --git a/jim-win32.c b/jim-win32.c
index 2925fb5..2a6e1b9 100644
--- a/jim-win32.c
+++ b/jim-win32.c
@@ -19,6 +19,15 @@
*/
#include <jim.h>
+
+/* Apparently windows.h and cygwin don't mix, but we seem to get
+ * away with it here. Use at your own risk under cygwin
+ */
+#if defined(__CYGWIN__)
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
#include <shellapi.h>
#include <lmcons.h>
#include <psapi.h>
diff --git a/jim-win32compat.h b/jim-win32compat.h
index 12275ba..0db8439 100644
--- a/jim-win32compat.h
+++ b/jim-win32compat.h
@@ -6,12 +6,12 @@
#define STRICT
#endif
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
/* None of these is needed for cygwin */
#if !defined(__CYGWIN__)
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
#define JIM_ANSIC
#define MKDIR_ONE_ARG
#define rand_r(S) ((void)(S), rand())