]> jfr.im git - solanum.git/blobdiff - include/modules.h
Add .travis.yml
[solanum.git] / include / modules.h
index b0a92dd33c52bacae91f6d5a6cc5a1ff05774c8c..8250e1be66a09794c4ac863cdd38a9ad7471600d 100644 (file)
 
 #define MAPI_RATBOX 1
 
-#if defined(HAVE_SHL_LOAD)
-#include <dl.h>
-#endif
-#if !defined(STATIC_MODULES) && defined(HAVE_DLFCN_H)
-#include <dlfcn.h>
-#endif
+#include <ltdl.h>
 
 #include "msg.h"
 #include "hook.h"
@@ -46,17 +41,12 @@ struct module
 {
        char *name;
        const char *version;
-       void *address;
+       lt_dlhandle address;
        int core;
        int mapi_version;
        void * mapi_header; /* actually struct mapi_mheader_av<mapi_version>    */
 };
 
-struct module_path
-{
-       char path[PATH_MAX];
-};
-
 #define MAPI_MAGIC_HDR 0x4D410000
 
 #define MAPI_V1                (MAPI_MAGIC_HDR | 0x1)
@@ -90,14 +80,8 @@ struct mapi_mheader_av1
        const char *      mapi_module_version;                  /* Module's version (freeform)  */
 };
 
-#ifndef STATIC_MODULES
-# define DECLARE_MODULE_AV1(name,reg,unreg,cl,hl,hfnlist, v) \
+#define DECLARE_MODULE_AV1(name,reg,unreg,cl,hl,hfnlist, v) \
        struct mapi_mheader_av1 _mheader = { MAPI_V1, reg, unreg, cl, hl, hfnlist, v}
-#else
-# define DECLARE_MODULE_AV1(name,reg,unreg,cl,hl,hfnlist, v) \
-       struct mapi_mheader_av1 name ## _mheader = { MAPI_V1, reg, unreg, cl, hl, hfnlist, v}
-void load_static_modules(void);
-#endif
 
 /* add a path */
 void mod_add_path(const char *path);