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)
10 void *dlopen(const char *path
, int mode
);
11 int dlclose(void *handle
);
12 void *dlsym(void *handle
, const char *symbol
);
15 /* MS CRT always uses three digits after 'e' */
16 #define JIM_SPRINTF_DOUBLE_NEEDS_FIX
19 /* These are msvc vs gcc */
22 #pragma warning(disable:4146)
26 #define jim_wide _int64
28 #define LLONG_MAX 9223372036854775807I64
31 #define LLONG_MIN (-LLONG_MAX - 1I64)
33 #define JIM_WIDE_MIN LLONG_MIN
34 #define JIM_WIDE_MAX LLONG_MAX
35 #define JIM_WIDE_MODIFIER "I64d"
36 #define strcasecmp _stricmp
37 #define strtoull _strtoui64
38 #define snprintf _snprintf
47 int gettimeofday(struct timeval
*tv
, void *unused
);
55 long handle
; /* -1 for failed rewind */
56 struct _finddata_t info
;
57 struct dirent result
; /* d_name null iff first time */
58 char *name
; /* null-terminated char string */
61 DIR *opendir(const char *name
);
62 int closedir(DIR *dir
);
63 struct dirent
*readdir(DIR *dir
);
65 #elif defined(__MINGW32__)
67 #define strtod __strtod