diff options
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | actions.c | 1 | ||||
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | modules.c | 27 | ||||
-rw-r--r-- | operserv.c | 10 | ||||
-rw-r--r-- | version.log | 6 | ||||
-rw-r--r-- | version.sh | 2 |
7 files changed, 26 insertions, 24 deletions
@@ -1,6 +1,7 @@ Anope Version S V N ------------------- Provided by Anope Dev. <dev@anope.org> - 2004 +06/16 F Module support for OpenBSD systems [#106] 06/10 A User customizable pseudo-client modes. [ #99] 06/10 A Improved handling of /NS INFO for pseudo-clients. [ #98] 06/07 A Added register script in /bin/ for users to register anope. [ #00] @@ -86,7 +86,6 @@ void kill_user(const char *source, const char *user, const char *reason) snprintf(buf, sizeof(buf), "%s (%s)", source, reason); av[0] = sstrdup(user); av[1] = buf; - /* send_cmd(ServerName, "SVSKILL %s :%s", user, reason); */ send_cmd(source, "KILL %s :%s", user, av[1]); do_kill(source, 2, av); free(av[0]); @@ -648,8 +648,7 @@ ok=0 echo "Do you want to compile Anope with Module support?" echo "This will allow you to load and unload external modules of code without" echo "restarting services. You can find several Anope modules on our website." -echo "This requires libdl, if you have problems compiling disable this option." -echo "(this option is ignored on OpenBSD for the time being)" +echo "If you have problems compiling disable this option." while [ $ok -eq 0 ] ; do echo2 "[$DEF] " if read INPUT ; then : ; else echo "" ; exit 1 ; fi @@ -14,18 +14,27 @@ #include "modules.h" #include "language.h" -/* - * Disable the modules on OpenBSD (for now) - * there is work in progress for this. - */ #ifdef __OpenBSD__ -#ifdef USE_MODULES -#undef USE_MODULES -#endif /* USE_MODULES */ +#define DL_PREFIX "_" /* so OpenBSD can lookup the symbols */ +#else +#define DL_PREFIX "" #endif /* __OpenBSD__ */ #ifdef USE_MODULES #include <dlfcn.h> +/* Define these for systems without them */ +#ifndef RTLD_NOW +#define RTLD_NOW 0 +#endif +#ifndef RTLD_LAZY +#define RTLD_LAZY RTLD_NOW +#endif +#ifndef RTLD_GLOBAL +#define RTLD_GLOBAL 0 +#endif +#ifndef RTLD_LOCAL +#define RTLD_LOCAL 0 +#endif #endif /** @@ -348,7 +357,7 @@ int loadModule(Module * m, User * u) return MOD_ERR_NOLOAD; } - func = dlsym(m->handle, "AnopeInit"); + func = dlsym(m->handle, DL_PREFIX "AnopeInit"); if ((err = dlerror()) != NULL) { dlclose(m->handle); /* If no AnopeInit - it isnt an Anope Module, close it */ return MOD_ERR_NOLOAD; @@ -400,7 +409,7 @@ int unloadModule(Module * m, User * u) return MOD_ERR_UNKNOWN; } - func = dlsym(m->handle, "AnopeFini"); + func = dlsym(m->handle, DL_PREFIX "AnopeFini"); if (func) { func(); /* exec AnopeFini */ } diff --git a/operserv.c b/operserv.c index 94adfaafa..1aba50016 100644 --- a/operserv.c +++ b/operserv.c @@ -15,16 +15,6 @@ #include "services.h" #include "pseudo.h" -/* - * Disable the modules on OpenBSD (for now) - * there is work in progress for this. - */ -#ifdef __OpenBSD__ -#ifdef USE_MODULES -#undef USE_MODULES -#endif /* USE_MODULES */ -#endif /* __OpenBSD__ */ - extern Module *mod_current_module; extern int mod_current_op; extern User *mod_current_user; diff --git a/version.log b/version.log index 0e7b44019..d19a70d10 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="3" -VERSION_BUILD="194" +VERSION_BUILD="196" # $Log$ # +# BUILD : 1.7.3 (196) +# BUGS : 106 +# NOTES : Fixed module support for OpenBSD systems +# # BUILD : 1.7.3 (194) # BUGS : none # NOTES : Rolled back win32 support files in lieu of a branch. diff --git a/version.sh b/version.sh index c29a030ac..d17cdab44 100644 --- a/version.sh +++ b/version.sh @@ -4,7 +4,7 @@ # # Grab version information from the version control file. -CTRL="version.log" +CTRL="./version.log" if [ -f $CTRL ] ; then . $CTRL else |