diff -ruw old/src/lfunc.h new/src/lfunc.h
--- old/src/lfunc.h	2022-01-13 11:24:41.000000000 +0000
+++ new/src/lfunc.h	2022-05-11 15:50:59.666810530 +0100
@@ -11,10 +11,10 @@
 #include "lobject.h"
 
 
-#define sizeCclosure(n)	(cast_int(offsetof(CClosure, upvalue)) + \
+#define sizeCclosure(n)	(cast_int(OFFSETOF(CClosure, upvalue)) + \
                          cast_int(sizeof(TValue)) * (n))
 
-#define sizeLclosure(n)	(cast_int(offsetof(LClosure, upvals)) + \
+#define sizeLclosure(n)	(cast_int(OFFSETOF(LClosure, upvals)) + \
                          cast_int(sizeof(TValue *)) * (n))
 
 
diff -ruw old/src/lobject.h new/src/lobject.h
--- old/src/lobject.h	2022-01-13 11:24:42.000000000 +0000
+++ new/src/lobject.h	2022-05-11 15:50:59.670810561 +0100
@@ -475,8 +475,8 @@
 
 /* compute the offset of the memory area of a userdata */
 #define udatamemoffset(nuv) \
-	((nuv) == 0 ? offsetof(Udata0, bindata)  \
-                    : offsetof(Udata, uv) + (sizeof(UValue) * (nuv)))
+	((nuv) == 0 ? OFFSETOF(Udata0, bindata)  \
+                    : OFFSETOF(Udata, uv) + (sizeof(UValue) * (nuv)))
 
 /* get the address of the memory block inside 'Udata' */
 #define getudatamem(u)	(cast_charp(u) + udatamemoffset((u)->nuvalue))
Only in new/src: locale.h
diff -ruw old/src/lstate.c new/src/lstate.c
--- old/src/lstate.c	2022-01-13 11:24:42.000000000 +0000
+++ new/src/lstate.c	2022-05-11 15:50:59.674810589 +0100
@@ -48,7 +48,7 @@
 
 
 
-#define fromstate(L)	(cast(LX *, cast(lu_byte *, (L)) - offsetof(LX, l)))
+#define fromstate(L)	(cast(LX *, cast(lu_byte *, (L)) - OFFSETOF(LX, l)))
 
 
 /*
diff -ruw old/src/lstring.h new/src/lstring.h
--- old/src/lstring.h	2022-01-13 11:24:42.000000000 +0000
+++ new/src/lstring.h	2022-05-11 15:50:59.674810589 +0100
@@ -23,7 +23,7 @@
 ** Size of a TString: Size of the header plus space for the string
 ** itself (including final '\0').
 */
-#define sizelstring(l)  (offsetof(TString, contents) + ((l) + 1) * sizeof(char))
+#define sizelstring(l)  (OFFSETOF(TString, contents) + ((l) + 1) * sizeof(char))
 
 #define luaS_newliteral(L, s)	(luaS_newlstr(L, "" s, \
                                  (sizeof(s)/sizeof(char))-1))
diff -ruw old/src/lstrlib.c new/src/lstrlib.c
--- old/src/lstrlib.c	2022-01-13 11:24:42.000000000 +0000
+++ new/src/lstrlib.c	2022-05-11 15:50:59.674810589 +0100
@@ -1519,7 +1519,7 @@
     case '>': h->islittle = 0; break;
     case '=': h->islittle = nativeendian.little; break;
     case '!': {
-      const int maxalign = offsetof(struct cD, u);
+      const int maxalign = OFFSETOF(struct cD, u);
       h->maxalign = getnumlimit(h, fmt, maxalign);
       break;
     }
diff -ruw old/src/luaconf.h new/src/luaconf.h
--- old/src/luaconf.h	2022-01-13 11:24:43.000000000 +0000
+++ new/src/luaconf.h	2022-05-11 15:50:59.674810589 +0100
@@ -41,7 +41,7 @@
 ** Define it if you want Lua to avoid the use of a few C99 features
 ** or Windows-specific features on Windows.
 */
-/* #define LUA_USE_C89 */
+#define LUA_USE_C89
 
 
 /*
@@ -190,7 +190,7 @@
 ** non-conventional directories.
 */
 
-#define LUA_VDIR	LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
+#define LUA_VDIR "544"
 #if defined(_WIN32)	/* { */
 /*
 ** In Windows, any exclamation mark ('!') in the path is replaced by the
@@ -217,9 +217,9 @@
 
 #else			/* }{ */
 
-#define LUA_ROOT	"/usr/local/"
-#define LUA_LDIR	LUA_ROOT "share/lua/" LUA_VDIR "/"
-#define LUA_CDIR	LUA_ROOT "lib/lua/" LUA_VDIR "/"
+#define LUA_ROOT	"c:\\lua\\"
+#define LUA_LDIR	LUA_ROOT "share\\"
+#define LUA_CDIR	LUA_ROOT "lib\\"
 
 #if !defined(LUA_PATH_DEFAULT)
 #define LUA_PATH_DEFAULT  \
@@ -241,6 +241,7 @@
 ** CHANGE it if your machine does not use "/" as the directory separator
 ** and is not Windows. (On Windows Lua automatically uses "\".)
 */
+#define LUA_DIRSEP "\\"
 #if !defined(LUA_DIRSEP)
 
 #if defined(_WIN32)
@@ -329,6 +330,7 @@
 ** You can define it to get all options, or change specific options
 ** to fit your specific needs.
 */
+#define LUA_COMPAT_5_3
 #if defined(LUA_COMPAT_5_3)	/* { */
 
 /*
@@ -652,6 +654,7 @@
 ** Change that if you do not want to use C locales. (Code using this
 ** macro must include the header 'locale.h'.)
 */
+#define lua_getlocaledecpoint() '.'
 #if !defined(lua_getlocaledecpoint)
 #define lua_getlocaledecpoint()		(localeconv()->decimal_point[0])
 #endif
@@ -778,9 +781,21 @@
 ** without modifying the main part of the file.
 */
 
+#define OFFSETOF(T,f) ((size_t)(char *)&(((T*)(void*)0)->f))
 
+#define CLOCKS_PER_SEC CLK_TCK
 
-
+/* locale */
+#define LC_ALL 0
+#define LC_COLLATE 1
+#define LC_CTYPE 2
+#define LC_MONETARY 3
+#define LC_NUMERIC 4
+#define LC_TIME 5
+#define strcoll strcmp
+#define setlocale(x,y) ("C")
+#define mktime(x) (-1)
+#define strftime(x,y,z,w) (0)
 
 #endif
 
