using namespace std;
-#include "globals.h"
#include "inspircd_config.h"
+#include "globals.h"
#include "dynamic.h"
#ifndef STATIC_LINK
#include "inspstring.h"
#include "helperfuncs.h"
-DLLManager::DLLManager(const char *fname)
+DLLManager::DLLManager(char *fname)
{
#ifdef STATIC_LINK
this->staticname[0] = '\0';
// Try to open the library now and get any error message.
h = dlopen( fname, RTLD_NOW );
- err = dlerror();
+ err = (char*)dlerror();
#endif
}
#ifdef STATIC_LINK
-bool DLLManager::GetSymbol(initfunc* &v, const char *sym_name)
+bool DLLManager::GetSymbol(initfunc* &v, char *sym_name)
{
log(DEBUG,"Symbol search...");
for (int j = 0; modsyms[j].name; j++)
#else
-bool DLLManager::GetSymbol(void **v, const char *sym_name)
+bool DLLManager::GetSymbol(void **v, char *sym_name)
{
// try extract a symbol from the library
// get any error message is there is any
if(h != 0)
{
*v = dlsym( h, sym_name );
- err = dlerror();
+ err = (char*)dlerror();
if( err == 0 )
return true;
else
#endif
-DLLFactoryBase::DLLFactoryBase(const char *fname, const char *factory) : DLLManager(fname)
+DLLFactoryBase::DLLFactoryBase(char *fname, char *factory) : DLLManager(fname)
{
// try get the factory function if there is no error yet
if(LastError() == 0)
{
#ifdef STATIC_LINK
- GetSymbol( factory_func, factory ? factory : "init_module" );
+ GetSymbol( factory_func, factory ? factory : (char*)"init_module" );
#else
- GetSymbol( (void **)&factory_func, factory ? factory : "init_module" );
+ GetSymbol( (void **)&factory_func, factory ? factory : (char*)"init_module" );
#endif
}
}