From 76ff95b587231d4b02f15e59d1a1777f21a67188 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 2 Mar 2013 18:10:07 +0000 Subject: [PATCH] =?UTF-8?q?lua:=20more=20X360=20and=20NaCl=20compilation?= =?UTF-8?q?=20fixes=20for=20stuff=20we=20don=E2=80=99t=20need.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/Makefile.am | 9 +-------- src/lua/loadlib.c | 5 ++++- src/lua/lollua.vcxproj | 2 +- src/lua/lua.c | 4 ++++ 4 files changed, 10 insertions(+), 10 deletions(-) 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 #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 @@ - _LIB;%(PreprocessorDefinitions) + LUA_ANSI;%(PreprocessorDefinitions) 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);