From fabe111fb9e37c86beeecc773b9ad03c7046ccbf Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sun, 8 Sep 2013 16:54:33 +0200 Subject: Fix module loading in PURE_STATIC builds --- include/modules.h | 6 +----- src/modmanager_static.cpp | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/modules.h b/include/modules.h index e81f9465c..118d9ea1c 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1380,11 +1380,7 @@ struct AllModuleList { }; #define MODULE_INIT(x) static Module* MK_ ## x() { return new x; } \ - static const AllModuleList PREP_ ## x(&MK_ ## x, MODNAMESTR); - -#define MODNAMESTR MODNAMESTR_FN_2(MODNAME) -#define MODNAMESTR_FN_2(x) MODNAMESTR_FN_1(x) -#define MODNAMESTR_FN_1(x) #x + static const AllModuleList PREP_ ## x(&MK_ ## x, MODNAME ".so"); #else diff --git a/src/modmanager_static.cpp b/src/modmanager_static.cpp index eeb8b6f96..ee248f505 100644 --- a/src/modmanager_static.cpp +++ b/src/modmanager_static.cpp @@ -17,7 +17,7 @@ */ -#define MODNAME cmd_all +#define MODNAME "cmd_all" #include "inspircd.h" #include "exitcodes.h" @@ -186,7 +186,7 @@ void ModuleManager::Reload(Module* mod, HandlerBase1* callback) void ModuleManager::LoadAll() { - Load("cmd_all", true); + Load("cmd_all.so", true); Load("cmd_whowas.so", true); Load("cmd_lusers.so", true); Load("cmd_privmsg.so", true); -- cgit v1.2.3