diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index e0ad3606b..242950700 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -87,15 +87,15 @@ ENDIF() SET(MAIN_SOURCES_LINUX Console-posix.cpp Hooks-linux.cpp -PlugLoad-linux.cpp +PlugLoad-posix.cpp Process-linux.cpp ) SET(MAIN_SOURCES_DARWIN Console-posix.cpp -PlugLoad-darwin.cpp -Process-darwin.cpp Hooks-darwin.cpp +PlugLoad-posix.cpp +Process-darwin.cpp ) SET(MAIN_SOURCES_LINUX_EGGY diff --git a/library/PlugLoad-linux.cpp b/library/PlugLoad-linux.cpp deleted file mode 100644 index 69945c6f4..000000000 --- a/library/PlugLoad-linux.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "DFHack.h" -#include "PluginManager.h" -#include "Hooks.h" -#include - -/* - * Plugin loading functions - */ -namespace DFHack -{ - DFLibrary * OpenPlugin (const char * filename) - { - dlerror(); - DFLibrary * ret = (DFLibrary *) dlopen(filename, RTLD_NOW); - if(!ret) - { - std::cerr << dlerror() << std::endl; - } - return ret; - } - void * LookupPlugin (DFLibrary * plugin ,const char * function) - { - return (DFLibrary *) dlsym((void *)plugin, function); - } - void ClosePlugin (DFLibrary * plugin) - { - dlclose((void *) plugin); - } -} \ No newline at end of file diff --git a/library/PlugLoad-darwin.cpp b/library/PlugLoad-posix.cpp similarity index 93% rename from library/PlugLoad-darwin.cpp rename to library/PlugLoad-posix.cpp index 69945c6f4..25bb4170a 100644 --- a/library/PlugLoad-darwin.cpp +++ b/library/PlugLoad-posix.cpp @@ -35,10 +35,10 @@ namespace DFHack } void * LookupPlugin (DFLibrary * plugin ,const char * function) { - return (DFLibrary *) dlsym((void *)plugin, function); + return (void *) dlsym((void *)plugin, function); } void ClosePlugin (DFLibrary * plugin) { dlclose((void *) plugin); } -} \ No newline at end of file +}