mirror of
https://github.com/anope/anope.git
synced 2026-07-01 10:26:38 +02:00
Cleanup some stuff to a header.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1683 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+33
-14
@@ -69,20 +69,20 @@ typedef void * ano_module_t;
|
||||
/**********************************************************************
|
||||
* Module Returns
|
||||
**********************************************************************/
|
||||
#define MOD_ERR_OK 0
|
||||
#define MOD_ERR_MEMORY 1
|
||||
#define MOD_ERR_PARAMS 2
|
||||
#define MOD_ERR_EXISTS 3
|
||||
#define MOD_ERR_NOEXIST 4
|
||||
#define MOD_ERR_NOUSER 5
|
||||
#define MOD_ERR_NOLOAD 6
|
||||
#define MOD_ERR_NOUNLOAD 7
|
||||
#define MOD_ERR_SYNTAX 8
|
||||
#define MOD_ERR_NODELETE 9
|
||||
#define MOD_ERR_UNKNOWN 10
|
||||
#define MOD_ERR_FILE_IO 11
|
||||
#define MOD_ERR_NOSERVICE 12
|
||||
#define MOD_ERR_NO_MOD_NAME 13
|
||||
#define MOD_ERR_OK 0
|
||||
#define MOD_ERR_MEMORY 1
|
||||
#define MOD_ERR_PARAMS 2
|
||||
#define MOD_ERR_EXISTS 3
|
||||
#define MOD_ERR_NOEXIST 4
|
||||
#define MOD_ERR_NOUSER 5
|
||||
#define MOD_ERR_NOLOAD 6
|
||||
#define MOD_ERR_NOUNLOAD 7
|
||||
#define MOD_ERR_SYNTAX 8
|
||||
#define MOD_ERR_NODELETE 9
|
||||
#define MOD_ERR_UNKNOWN 10
|
||||
#define MOD_ERR_FILE_IO 11
|
||||
#define MOD_ERR_NOSERVICE 12
|
||||
#define MOD_ERR_NO_MOD_NAME 13
|
||||
|
||||
/*************************************************************************/
|
||||
/* Macros to export the Module API functions/variables */
|
||||
@@ -97,6 +97,25 @@ typedef void * ano_module_t;
|
||||
#endif
|
||||
/*************************************************************************/
|
||||
|
||||
#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
|
||||
|
||||
typedef enum { CORE,PROTOCOL,THIRD,SUPPORTED,QATESTED,ENCRYPTION } MODType;
|
||||
typedef enum { MOD_OP_LOAD, MOD_OP_UNLOAD } ModuleOperation;
|
||||
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
#include "language.h"
|
||||
#include "version.h"
|
||||
|
||||
#if !defined(_WIN32)
|
||||
#include <dlfcn.h>
|
||||
#else
|
||||
const char *ano_moderr(void);
|
||||
#endif
|
||||
|
||||
Module::Module(const std::string &mname, const std::string &creator)
|
||||
{
|
||||
this->name = mname; /* Our name */
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
#include "language.h"
|
||||
#include "version.h"
|
||||
|
||||
#if !defined(_WIN32)
|
||||
#include <dlfcn.h>
|
||||
#else
|
||||
const char *ano_moderr(void);
|
||||
#endif
|
||||
|
||||
void ModuleManager::LoadModuleList(int total_modules, char **module_list)
|
||||
{
|
||||
int idx;
|
||||
|
||||
@@ -15,25 +15,6 @@
|
||||
#include "language.h"
|
||||
#include "version.h"
|
||||
|
||||
#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
|
||||
|
||||
/**
|
||||
* Declare all the list's we want to use here
|
||||
**/
|
||||
|
||||
Reference in New Issue
Block a user