]> jfr.im git - solanum.git/blobdiff - include/modules.h
librb: whoops, didn't realise this was needed... :x
[solanum.git] / include / modules.h
index 168a7ac26f9d164a710635670d644f8c4cc4d36e..9c8da718f047a600395c9247623ed64722752091 100644 (file)
@@ -20,8 +20,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
- *
- *  $Id: modules.h 6 2005-09-10 01:02:21Z nenolod $
  */
 
 #ifndef INCLUDED_modules_h
 
 #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 "memory.h"
 #include "hook.h"
 
 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[MAXPATHLEN];
-};
-
 #define MAPI_MAGIC_HDR 0x4D410000
 
 #define MAPI_V1                (MAPI_MAGIC_HDR | 0x1)
@@ -91,14 +78,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);
@@ -117,7 +98,6 @@ extern int unload_one_module(const char *, int);
 extern int load_one_module(const char *, int);
 extern int load_a_module(const char *, int, int);
 extern int findmodule_byname(const char *);
-extern char *irc_basename(const char *);
 extern void modules_init(void);
 
 #endif /* INCLUDED_modules_h */