1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 12:16:38 +02:00

Remove USE_MODULES, it'd not really work anyway.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1292 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Robin Burchell w00t@inspircd.org
2008-10-01 21:07:44 +00:00
parent e4b0e4f396
commit dc8565e08f
5 changed files with 22 additions and 73 deletions
Vendored
+3 -22
View File
@@ -4191,8 +4191,6 @@ fi
DIS_MODULES="Modules: Yes"
@@ -4345,23 +4343,11 @@ if test $ac_cv_lib_dl_dlopen = yes; then
ANOPELIBS="$ANOPELIBS -ldl"
cat >>confdefs.h <<\_ACEOF
#define USE_MODULES 1
_ACEOF
USE_MODULES="yes"
DIS_MODULES="Modules: Yes"
else
{ echo "$as_me:$LINENO: WARNING: Dynamic linking is not enabled because dlopen was not found" >&5
echo "$as_me: WARNING: Dynamic linking is not enabled because dlopen was not found" >&2;}
cat >>confdefs.h <<\_ACEOF
#define STATIC_LINKING "NO_MODULES"
_ACEOF
DIS_MODULES="Modules: No"
{ { echo "$as_me:$LINENO: error: \"dlopen() is required for Anope to be compiled and used. Sorry.\"" >&5
echo "$as_me: error: \"dlopen() is required for Anope to be compiled and used. Sorry.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -4509,11 +4495,6 @@ fi
MODULEFLAGS=$ac_cv_pic
cat >>confdefs.h <<\_ACEOF
#define USE_MODULES 1
_ACEOF
{ echo "$as_me:$LINENO: checking for short" >&5
echo $ECHO_N "checking for short... $ECHO_C" >&6; }
if test "${ac_cv_type_short+set}" = set; then
+1 -9
View File
@@ -147,21 +147,14 @@ AC_SUBST(LDFLAGS)
AC_CHECK_HEADER(sys/types.h,AC_DEFINE(HAS_SYS_TYPES_H,1,"Has sys/types.h"))
DIS_MODULES="Modules: Yes"
dnl module checking based on Unreal's module checking code
AC_DEFUN(AC_ENABLE_DYN,
[
AC_CHECK_FUNC(dlopen,, AC_CHECK_LIB(dl,dlopen,[
ANOPELIBS="$ANOPELIBS -ldl"
AC_DEFINE(USE_MODULES,1,"Modules are available")
USE_MODULES="yes"
DIS_MODULES="Modules: Yes"
],
[
AC_MSG_WARN(Dynamic linking is not enabled because dlopen was not found)
AC_DEFINE(STATIC_LINKING,"NO_MODULES","modules not available")
DIS_MODULES="Modules: No"
AC_ERROR("dlopen() is required for Anope to be compiled and used. Sorry.")
]))
hold_cflags=$CFLAGS
@@ -230,7 +223,6 @@ fi
MODULEFLAGS=$ac_cv_pic
AC_SUBST(MODULEFLAGS)
AC_DEFINE(USE_MODULES,1,"Modules available")
])
AC_ENABLE_DYN
-3
View File
@@ -138,9 +138,6 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* "Modules available" */
#undef USE_MODULES
/* "Use Mysql" */
#undef USE_MYSQL
+1 -1
View File
@@ -4,7 +4,7 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
'RUNGROUP=${RUNGROUP}' 'USE_MODULES=${USE_MODULES}'
'RUNGROUP=${RUNGROUP}'
LANGOBJS = cat de en_us es fr gr hun it nl pl pt ru tr
LANGSRCS = cat.l de.l en_us.l es.l fr.l gr.l hun.l it.l nl.l pl.l pt.l ru.l tr.l
+17 -38
View File
@@ -16,25 +16,23 @@
#include "language.h"
#include "version.h"
#if defined(USE_MODULES) && !defined(_WIN32)
#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
#ifdef _WIN32
const char *ano_moderr(void);
#if !defined(_WIN32)
#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
#else
const char *ano_moderr(void);
#endif
/**
@@ -91,7 +89,6 @@ char *ModuleGetErrStr(int status)
*/
void modules_init(void)
{
#ifdef USE_MODULES
int idx;
int ret;
Module *m;
@@ -115,7 +112,6 @@ void modules_init(void)
mod_current_user = NULL;
}
}
#endif
}
/**
@@ -219,7 +215,6 @@ int protocol_module_init(void)
*/
void modules_delayed_init(void)
{
#ifdef USE_MODULES
int idx;
int ret;
Module *m;
@@ -243,7 +238,6 @@ void modules_delayed_init(void)
destroyModule(m);
}
}
#endif
}
/**
@@ -258,7 +252,6 @@ void modules_delayed_init(void)
*/
void modules_unload_all(bool fini, bool unload_proto)
{
#ifdef USE_MODULES
int idx;
ModuleHash *mh, *next;
void (*func) (void);
@@ -293,7 +286,6 @@ void modules_unload_all(bool fini, bool unload_proto)
mh = next;
}
}
#endif
}
/**
@@ -510,7 +502,6 @@ int encryptionModuleLoaded()
*/
int moduleCopyFile(char *name, char *output)
{
#ifdef USE_MODULES
int ch;
FILE *source, *target;
int srcfp;
@@ -558,7 +549,6 @@ int moduleCopyFile(char *name, char *output)
if (fclose(target) != 0) {
return MOD_ERR_FILE_IO;
}
#endif
return MOD_ERR_OK;
}
@@ -570,7 +560,6 @@ int moduleCopyFile(char *name, char *output)
*/
int loadModule(Module * m, User * u)
{
#ifdef USE_MODULES
char buf[4096];
int len;
const char *err;
@@ -687,10 +676,6 @@ int loadModule(Module * m, User * u)
}
addModule(m);
return MOD_ERR_OK;
#else
return MOD_ERR_NOLOAD;
#endif
}
/**
@@ -701,7 +686,6 @@ int loadModule(Module * m, User * u)
*/
int unloadModule(Module * m, User * u)
{
#ifdef USE_MODULES
void (*func) (void);
if (!m || !m->handle) {
@@ -749,9 +733,6 @@ int unloadModule(Module * m, User * u)
delModule(m);
return MOD_ERR_OK;
}
#else
return MOD_ERR_NOUNLOAD;
#endif
}
/**
@@ -2081,7 +2062,6 @@ void moduleSetHelpHelp(void (*func) (User * u))
**/
void moduleDisplayHelp(int service, User * u)
{
#ifdef USE_MODULES
int idx;
ModuleHash *current = NULL;
Module *calling_module = mod_current_module;
@@ -2112,7 +2092,6 @@ void moduleDisplayHelp(int service, User * u)
mod_current_module = calling_module;
mod_current_module_name = calling_module_name;
#endif
}
/**