diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-11-07 08:55:09 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-11-07 15:31:41 +1000 |
commit | 05e51ed5447b83badfd8ed550c7386b68eb94919 (patch) | |
tree | c0c2c87069eaf34f9d90aaa8e810b7cf8f40c4fc /jim-win32compat.c | |
parent | 5fe0bb5f3beedb262512a8e548bf7cc6ed9bff96 (diff) | |
download | jimtcl-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.c')
-rw-r--r-- | jim-win32compat.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/jim-win32compat.c b/jim-win32compat.c index 9eb8e7f..94bd831 100644 --- a/jim-win32compat.c +++ b/jim-win32compat.c @@ -1,6 +1,13 @@ #include "jim.h" #include "jimautoconf.h" +#if defined(_WIN32) || defined(WIN32) +#ifndef STRICT +#define STRICT +#endif +#define WIN32_LEAN_AND_MEAN +#include <windows.h> + #if defined(HAVE_DLOPEN_COMPAT) void *dlopen(const char *path, int mode) { @@ -30,6 +37,9 @@ char *dlerror(void) #endif #ifdef _MSC_VER + +#include <sys/timeb.h> + /* POSIX gettimeofday() compatibility for WIN32 */ int gettimeofday(struct timeval *tv, void *unused) { @@ -119,3 +129,4 @@ struct dirent *readdir(DIR * dir) return result; } #endif +#endif |