diff options
Diffstat (limited to 'src/lua-interface.cpp')
-rw-r--r-- | src/lua-interface.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp index 267a615..4b1e949 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) |