| @@ -3,15 +3,8 @@ include $(top_srcdir)/build/autotools/common.am | |||||
| noinst_LIBRARIES = liblollua.a | 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_SOURCES = $(lua_sources) | ||||
| liblollua_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir) $(disable_cflags) | |||||
| liblollua_a_CPPFLAGS = $(AM_CPPFLAGS) -DLUA_ANSI | |||||
| lua_sources = \ | lua_sources = \ | ||||
| lapi.c lapi.h lauxlib.c lauxlib.h lbaselib.c lbitlib.c \ | lapi.c lapi.h lauxlib.c lauxlib.h lbaselib.c lbitlib.c \ | ||||
| @@ -15,7 +15,10 @@ | |||||
| /* | /* | ||||
| ** if needed, includes windows header before everything else | ** 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> | #include <windows.h> | ||||
| #endif | #endif | ||||
| @@ -58,7 +58,7 @@ | |||||
| <Import Project="$(SolutionDir)\Lol.Core.Rules.props" /> | <Import Project="$(SolutionDir)\Lol.Core.Rules.props" /> | ||||
| <ItemDefinitionGroup> | <ItemDefinitionGroup> | ||||
| <ClCompile> | <ClCompile> | ||||
| <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||||
| <PreprocessorDefinitions>LUA_ANSI;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||||
| </ClCompile> | </ClCompile> | ||||
| </ItemDefinitionGroup> | </ItemDefinitionGroup> | ||||
| <ItemGroup> | <ItemGroup> | ||||
| @@ -434,11 +434,15 @@ static int runargs (lua_State *L, char **argv, int n) { | |||||
| static int handle_luainit (lua_State *L) { | static int handle_luainit (lua_State *L) { | ||||
| const char *name = "=" LUA_INITVERSION; | const char *name = "=" LUA_INITVERSION; | ||||
| #if HAVE_GETENV // LOL BEGIN | |||||
| const char *init = getenv(name + 1); | const char *init = getenv(name + 1); | ||||
| if (init == NULL) { | if (init == NULL) { | ||||
| name = "=" LUA_INIT; | name = "=" LUA_INIT; | ||||
| init = getenv(name + 1); /* try alternative name */ | init = getenv(name + 1); /* try alternative name */ | ||||
| } | } | ||||
| #else | |||||
| const char *init = NULL; | |||||
| #endif // LOL END | |||||
| if (init == NULL) return LUA_OK; | if (init == NULL) return LUA_OK; | ||||
| else if (init[0] == '@') | else if (init[0] == '@') | ||||
| return dofile(L, init+1); | return dofile(L, init+1); | ||||