Browse Source

lua: more X360 and NaCl compilation fixes for stuff we don’t need.

legacy
Sam Hocevar sam 11 years ago
parent
commit
76ff95b587
4 changed files with 10 additions and 10 deletions
  1. +1
    -8
      src/lua/Makefile.am
  2. +4
    -1
      src/lua/loadlib.c
  3. +1
    -1
      src/lua/lollua.vcxproj
  4. +4
    -0
      src/lua/lua.c

+ 1
- 8
src/lua/Makefile.am View File

@@ -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 \


+ 4
- 1
src/lua/loadlib.c View File

@@ -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



+ 1
- 1
src/lua/lollua.vcxproj View File

@@ -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>


+ 4
- 0
src/lua/lua.c View File

@@ -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);


Loading…
Cancel
Save