diff --git a/src/lua/Makefile.am b/src/lua/Makefile.am
index 656c58a1..a0d80e5a 100644
--- a/src/lua/Makefile.am
+++ b/src/lua/Makefile.am
@@ -3,15 +3,8 @@ include $(top_srcdir)/build/autotools/common.am
 
 noinst_LIBRARIES = liblollua.a
 
-# Only remove flags that were actually set, because we don't know
-# what the compiler actually accepts.
-#disable_cflags = $(filter $(AM_CPPFLAGS:-W%=-Wno-%), \
-#    -Wno-shadow -Wno-unused -Wno-cast-qual -Wno-strict-aliasing \
-#    -Wno-reorder -Wno-maybe-uninitialized -Wno-narrowing \
-#    -Wno-parentheses)
-
 liblollua_a_SOURCES = $(lua_sources)
-liblollua_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir) $(disable_cflags)
+liblollua_a_CPPFLAGS = $(AM_CPPFLAGS) -DLUA_ANSI
 
 lua_sources = \
     lapi.c lapi.h lauxlib.c lauxlib.h lbaselib.c lbitlib.c \
diff --git a/src/lua/loadlib.c b/src/lua/loadlib.c
index 0c9cd185..a2fd185d 100644
--- a/src/lua/loadlib.c
+++ b/src/lua/loadlib.c
@@ -15,7 +15,10 @@
 /*
 ** if needed, includes windows header before everything else
 */
-#if defined(_WIN32)
+// LOL BEGIN
+//#if defined(_WIN32)
+#if defined(_WIN32) && !defined(_XBOX)
+// LOL END
 #include <windows.h>
 #endif
 
diff --git a/src/lua/lollua.vcxproj b/src/lua/lollua.vcxproj
index 370f78a2..a8718cf9 100644
--- a/src/lua/lollua.vcxproj
+++ b/src/lua/lollua.vcxproj
@@ -58,7 +58,7 @@
   <Import Project="$(SolutionDir)\Lol.Core.Rules.props" />
   <ItemDefinitionGroup>
     <ClCompile>
-      <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>LUA_ANSI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
diff --git a/src/lua/lua.c b/src/lua/lua.c
index c1b03112..4694124b 100644
--- a/src/lua/lua.c
+++ b/src/lua/lua.c
@@ -434,11 +434,15 @@ static int runargs (lua_State *L, char **argv, int n) {
 
 static int handle_luainit (lua_State *L) {
   const char *name = "=" LUA_INITVERSION;
+#if HAVE_GETENV // LOL BEGIN
   const char *init = getenv(name + 1);
   if (init == NULL) {
     name = "=" LUA_INIT;
     init = getenv(name + 1);  /* try alternative name */
   }
+#else
+  const char *init = NULL;
+#endif // LOL END
   if (init == NULL) return LUA_OK;
   else if (init[0] == '@')
     return dofile(L, init+1);