From 53e2ed8473b837de246009d1d4e419dc362d11ad Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 9 Jan 2014 08:05:08 +0100 Subject: [PATCH 1/3] Specified the dynamic loader Lua should use. --- lib/lua/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt index b4b5b5f1d..ff5dc927c 100644 --- a/lib/lua/CMakeLists.txt +++ b/lib/lua/CMakeLists.txt @@ -25,6 +25,15 @@ else() add_library(lua ${SOURCE}) endif() +# Tell Lua what dynamic loader to use (for LuaRocks): +if (UNIX) + if (APPLE) + add_definitions(-DLUA_USE_MACOSX) + else() + add_definitions(-DLUA_USE_LINUX) + endif () +endif() + if (UNIX) target_link_libraries(lua m ${DYNAMIC_LOADER}) endif() From 18310752b8e7911b02e8fc27d15e6d534c059345 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 9 Jan 2014 08:05:34 +0100 Subject: [PATCH 2/3] Fixed a typo in the TestLuaRocks test plugin. --- MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua b/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua index 6e90b1ae9..4a7cd4e1e 100644 --- a/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua +++ b/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua @@ -27,7 +27,7 @@ LOG("headers: "); for k, v in pairs(headers or {}) do LOG(" " .. k .. ": " .. v); end -LOG("body length: " .. string.length(body)); +LOG("body length: " .. string.len(body)); From 1704d0fd6bae38066d6b15e6468dadc058d1f703 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 10 Jan 2014 10:03:39 +0100 Subject: [PATCH 3/3] Using dlopen() on all platforms except WIN32. --- lib/lua/CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt index ff5dc927c..af03f4b1a 100644 --- a/lib/lua/CMakeLists.txt +++ b/lib/lua/CMakeLists.txt @@ -27,11 +27,7 @@ endif() # Tell Lua what dynamic loader to use (for LuaRocks): if (UNIX) - if (APPLE) - add_definitions(-DLUA_USE_MACOSX) - else() - add_definitions(-DLUA_USE_LINUX) - endif () + add_definitions(-DLUA_USE_DLOPEN) endif() if (UNIX)