1 #ifndef JIM_WIN32COMPAT_H
2 #define JIM_WIN32COMPAT_H
4 /* Compatibility for Windows (mingw and msvc, not cygwin */
6 /* Note that at this point we don't yet have access to jimautoconf.h */
7 #if defined(_WIN32) || defined(WIN32)
11 #define WIN32_LEAN_AND_MEAN
15 void *dlopen(const char *path
, int mode
);
16 int dlclose(void *handle
);
17 void *dlsym(void *handle
, const char *symbol
);
21 /* These are msvc vs gcc */
24 #pragma warning(disable:4146)
27 #define strcasecmp _stricmp
29 #define jim_wide _int64
31 #define LLONG_MAX 9223372036854775807I64
34 #define LLONG_MIN (-LLONG_MAX - 1I64)
36 #define JIM_WIDE_MIN LLONG_MIN
37 #define JIM_WIDE_MAX LLONG_MAX
38 #define JIM_WIDE_MODIFIER "I64d"
42 #define HAVE_GETTIMEOFDAY
48 int gettimeofday(struct timeval
*tv
, void *unused
);
56 long handle
; /* -1 for failed rewind */
57 struct _finddata_t info
;
58 struct dirent result
; /* d_name null iff first time */
59 char *name
; /* null-terminated char string */
62 DIR *opendir(const char *name
);
63 int closedir(DIR *dir
);
64 struct dirent
*readdir(DIR *dir
);