From 1fbd78b5c9eac45c1e751a14ded649cc1cb1d53a Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 2 Jun 2009 11:06:15 -0700 Subject: Adding native MINGW32 support. --- src/lua-interface.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/lua-interface.cpp') diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp index 4dc7129..6a7a9fc 100644 --- a/src/lua-interface.cpp +++ b/src/lua-interface.cpp @@ -51,11 +51,16 @@ #ifndef _MSVC // this seems ignored under apple's gcc... dammit. +// Gah. msys doesn't support that properly either. #define WEAK __attribute__ ((weak)) #else #define WEAK #endif +#if defined(__APPLE__) || defined(__MINGW32__) +#define NO_SMART_MODULES +#endif + extern "C" { extern void luaconfigfiles_init(Lua * L) WEAK; @@ -312,7 +317,7 @@ int sLua_baselua_interface::baselua_interface_proceed_statics(Lua * L, int n, in case BASELUA_INTERFACE_LOADMODULE: filename = L->tostring(); if (0) { -#if !(defined(__APPLE__) || defined(MODULES_BUILT_IN)) +#if !(defined(NO_SMART_MODULES) || defined(MODULES_BUILT_IN)) } else if ((filename == "luaconfigfiles") && (luaconfigfiles_init != NULL)) { luaconfigfiles_init(L); #ifndef _MSVC @@ -689,7 +694,7 @@ static void * interactive_prompt(void * __L) { } void autoload_exports(Lua * L) { -#if not defined(__APPLE__) or defined(MODULES_BUILT_IN) +#if not defined(NO_SMART_MODULES) or defined(MODULES_BUILT_IN) if (lualibs_init) lualibs_init(L); if (luahandle_init) -- cgit v1.2.3