mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-06 14:53:12 +02:00
Module v3 changes
This commit is contained in:
@@ -982,3 +982,5 @@ seen. gmtime warning still there
|
||||
I see nowhere a bug could happen.
|
||||
- Removed umode +T (useless) and the fue oflags since
|
||||
oper::snomask supercedes them.
|
||||
- Fixed another module v3 bug caused by Stskeeps drunkeness
|
||||
- Started adding HP-UX module support (Not enough added where it actually works yet)
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#define irc_dlclose FreeLibrary
|
||||
#define irc_dlsym (void *)GetProcAddress
|
||||
#undef irc_dlerror
|
||||
#elif defined(HPUX)
|
||||
#define irc_dlopen(x,y) shl_load(x,y,0L)
|
||||
#define irc_dlclose shl_unload
|
||||
#define irc_dlerror() strerror(errno)
|
||||
#else
|
||||
#define irc_dlopen dlopen
|
||||
#define irc_dlclose dlclose
|
||||
@@ -81,6 +85,8 @@ struct _Module
|
||||
ModuleHeader *header; /* The module's header */
|
||||
#ifdef _WIN32
|
||||
HMODULE dll; /* Return value of LoadLibrary */
|
||||
#elif defined(HPUX)
|
||||
shl_t dll;
|
||||
#else
|
||||
void *dll; /* Return value of dlopen */
|
||||
#endif
|
||||
|
||||
+5
-4
@@ -35,6 +35,9 @@
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#define RTLD_NOW 0
|
||||
#elif defined(HPUX)
|
||||
#include <dl.h>
|
||||
#define RTLD_NOW BIND_IMMEDIATE
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
@@ -141,8 +144,6 @@ char *Module_Load (char *path, int load)
|
||||
}
|
||||
if (!(Mod_Load = irc_dlsym(Mod, "Mod_Load")))
|
||||
{
|
||||
/* We cannot do delayed unloading if this happens */
|
||||
(*Mod_Unload)();
|
||||
Module_free(mod);
|
||||
return ("Unable to locate Mod_Load");
|
||||
}
|
||||
@@ -365,11 +366,11 @@ void module_loadall(int module_load)
|
||||
{
|
||||
if (mi->flags & MODFLAG_LOADED)
|
||||
continue;
|
||||
if (fp = (iFP) irc_dlsym(mi->dll, "mod_load"))
|
||||
if (fp = (iFP) irc_dlsym(mi->dll, "Mod_Load"))
|
||||
{
|
||||
}
|
||||
else
|
||||
if (fp = (iFP) irc_dlsym(mi->dll, "_mod_load"))
|
||||
if (fp = (iFP) irc_dlsym(mi->dll, "_Mod_Load"))
|
||||
{
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user