aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpencer Oliver <spen@spen-soft.co.uk>2010-11-16 17:23:10 +0000
committerSteve Bennett <steveb@workware.net.au>2010-11-17 07:23:13 +1000
commitacb85448a17708101ed2a7aa8fda71ab0794877a (patch)
tree17b5d0bcc9ba724b3f8fd7480790d8619723c9ef
parent31d09164ecc9581d1767a12c6d614d70daa232e4 (diff)
downloadjimtcl-acb85448a17708101ed2a7aa8fda71ab0794877a.zip
jimtcl-acb85448a17708101ed2a7aa8fda71ab0794877a.tar.gz
jimtcl-acb85448a17708101ed2a7aa8fda71ab0794877a.tar.bz2
build: fix cygwin build issue
Avoid windows.h on cygwin Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
-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())