diff options
Diffstat (limited to 'src/compat.h')
-rw-r--r-- | src/compat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h index 35f9ef2..2033aa3 100644 --- a/src/compat.h +++ b/src/compat.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #if LUA_VERSION_NUM == 501 | 7 | #if LUA_VERSION_NUM == 501 |
8 | void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup); | 8 | void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup); |
9 | void *luaL_testudata(lua_State *L, int ud, const char *tname); | ||
9 | #endif | 10 | #endif |
10 | 11 | ||
11 | 12 | ||
@@ -13,6 +14,17 @@ void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup); | |||
13 | #include <sys/types.h> | 14 | #include <sys/types.h> |
14 | #endif | 15 | #endif |
15 | 16 | ||
17 | // Windows compatibility; define DWORD and TRUE/FALSE on non-Windows | ||
18 | #ifndef _WIN32 | ||
19 | #ifndef DWORD | ||
20 | #define DWORD unsigned long | ||
21 | #endif | ||
22 | #ifndef TRUE | ||
23 | #define TRUE 1 | ||
24 | #define FALSE 0 | ||
25 | #endif | ||
26 | #endif | ||
27 | |||
16 | #ifdef _MSC_VER | 28 | #ifdef _MSC_VER |
17 | // MSVC Windows doesn't have ssize_t, so we define it here | 29 | // MSVC Windows doesn't have ssize_t, so we define it here |
18 | #if SIZE_MAX == UINT_MAX | 30 | #if SIZE_MAX == UINT_MAX |