summaryrefslogtreecommitdiff
path: root/src/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat.h')
-rw-r--r--src/compat.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h
index 35f9ef2..7a1fcee 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -13,6 +13,17 @@ void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup);
#include <sys/types.h>
#endif
+// Windows compatibility; define DWORD and TRUE/FALSE on non-Windows
+#ifndef _WIN32
+#ifndef DWORD
+#define DWORD unsigned long
+#endif
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+#endif
+
#ifdef _MSC_VER
// MSVC Windows doesn't have ssize_t, so we define it here
#if SIZE_MAX == UINT_MAX