aboutsummaryrefslogtreecommitdiff
path: root/jim-win32compat.h
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-11-07 08:55:09 +1000
committerSteve Bennett <steveb@workware.net.au>2011-11-07 15:31:41 +1000
commit05e51ed5447b83badfd8ed550c7386b68eb94919 (patch)
treec0c2c87069eaf34f9d90aaa8e810b7cf8f40c4fc /jim-win32compat.h
parent5fe0bb5f3beedb262512a8e548bf7cc6ed9bff96 (diff)
downloadjimtcl-05e51ed5447b83badfd8ed550c7386b68eb94919.zip
jimtcl-05e51ed5447b83badfd8ed550c7386b68eb94919.tar.gz
jimtcl-05e51ed5447b83badfd8ed550c7386b68eb94919.tar.bz2
Allow building with MSVC on windows
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-win32compat.h')
-rw-r--r--jim-win32compat.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/jim-win32compat.h b/jim-win32compat.h
index 89e01f5..8dc0bde 100644
--- a/jim-win32compat.h
+++ b/jim-win32compat.h
@@ -5,11 +5,6 @@
/* Note that at this point we don't yet have access to jimautoconf.h */
#if defined(_WIN32) || defined(WIN32)
-#ifndef STRICT
- #define STRICT
-#endif
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
#define HAVE_DLOPEN
void *dlopen(const char *path, int mode);
@@ -24,8 +19,7 @@ char *dlerror(void);
#pragma warning(disable:4146)
#endif
-#define strcasecmp _stricmp
-
+#include <limits.h>
#define jim_wide _int64
#ifndef LLONG_MAX
#define LLONG_MAX 9223372036854775807I64
@@ -36,10 +30,12 @@ char *dlerror(void);
#define JIM_WIDE_MIN LLONG_MIN
#define JIM_WIDE_MAX LLONG_MAX
#define JIM_WIDE_MODIFIER "I64d"
+#define strcasecmp _stricmp
+#define strtoull _strtoui64
+#define snprintf _snprintf
#include <io.h>
-#define HAVE_GETTIMEOFDAY
struct timeval {
long tv_sec;
long tv_usec;