summaryrefslogtreecommitdiffstats
path: root/src/Common
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-05-20 20:04:09 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-05-20 20:04:09 +0200
commit325ee09f8fa61185efd6ec8b64b6432686170ac8 (patch)
tree7380bd046d2582034b44905b2dfe71c77f27c0e4 /src/Common
parent4bbe42a77b6782fd6889e673c10316f7e668eae8 (diff)
downloadmad-325ee09f8fa61185efd6ec8b64b6432686170ac8.tar
mad-325ee09f8fa61185efd6ec8b64b6432686170ac8.zip
Module wieder heil-gebastelt
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/ModuleManager.cpp9
-rw-r--r--src/Common/RequestHandlers/CMakeLists.txt2
-rw-r--r--src/Common/Requests/CMakeLists.txt2
3 files changed, 8 insertions, 5 deletions
diff --git a/src/Common/ModuleManager.cpp b/src/Common/ModuleManager.cpp
index 569f5aa..05a2b73 100644
--- a/src/Common/ModuleManager.cpp
+++ b/src/Common/ModuleManager.cpp
@@ -17,6 +17,9 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+#include <config.h>
+
#include "ModuleManager.h"
#include "ConfigEntry.h"
@@ -73,7 +76,7 @@ lt_dlhandle ModuleManager::loadModule(const std::string &name) {
std::map<std::string, std::pair<lt_dlhandle, bool> >::iterator mod = modules.find(name);
if(mod == modules.end()) {
- lt_dlhandle handle = lt_dlopen((name + ".la").c_str());
+ lt_dlhandle handle = lt_dlopen((name + MODULE_SUFFIX).c_str());
if(!handle)
return 0;
@@ -81,7 +84,7 @@ lt_dlhandle ModuleManager::loadModule(const std::string &name) {
mod = modules.insert(std::make_pair(lt_dlgetinfo(handle)->name, std::make_pair(handle, false))).first;
}
if(!mod->second.second) {
- void (*initFun)() = (void(*)())lt_dlsym(mod->second.first, "init");
+ void (*initFun)() = (void(*)())lt_dlsym(mod->second.first, (name + "_init").c_str());
if(initFun)
(*initFun)();
@@ -95,7 +98,7 @@ lt_dlhandle ModuleManager::loadModule(const std::string &name) {
void ModuleManager::unloadModule(const std::string &name) {
void (*deinitFun)();
- deinitFun = (void(*)())lt_dlsym(modules[name].first, "deinit");
+ deinitFun = (void(*)())lt_dlsym(modules[name].first, (name + "_deinit").c_str());
if(deinitFun)
(*deinitFun)();
diff --git a/src/Common/RequestHandlers/CMakeLists.txt b/src/Common/RequestHandlers/CMakeLists.txt
index 49f9079..f774e14 100644
--- a/src/Common/RequestHandlers/CMakeLists.txt
+++ b/src/Common/RequestHandlers/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories(${INCLUDES})
-add_library(RequestHandlers
+add_library(RequestHandlers STATIC
DisconnectRequestHandler.cpp FSInfoRequestHandler.cpp StatusRequestHandler.cpp
)
target_link_libraries(RequestHandlers Common)
diff --git a/src/Common/Requests/CMakeLists.txt b/src/Common/Requests/CMakeLists.txt
index 1d49f0e..54b14e1 100644
--- a/src/Common/Requests/CMakeLists.txt
+++ b/src/Common/Requests/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories(${INCLUDES})
-add_library(Requests
+add_library(Requests STATIC
DisconnectRequest.cpp IdentifyRequest.cpp SimpleRequest.cpp UserInfoRequest.cpp
)
target_link_libraries(Requests ${KRB5_LIBRARIES})