Skip to content
Snippets Groups Projects
Commit f2e1df3e authored by Howard Chu's avatar Howard Chu
Browse files

Consolidated static/dynamic backend switches

parent 715d087c
No related branches found
No related tags found
No related merge requests found
Showing with 1205 additions and 1993 deletions
This diff is collapsed.
This diff is collapsed.
......@@ -944,81 +944,42 @@
/* define to support BDB backend */
#undef SLAPD_BDB
/* define to support dynamic BDB backend */
#undef SLAPD_BDB_DYNAMIC
/* define to support DNS SRV backend */
#undef SLAPD_DNSSRV
/* define to support dynamic DNS SRV backend */
#undef SLAPD_DNSSRV_DYNAMIC
/* define to support HDB backend */
#undef SLAPD_HDB
/* define to support dynamic HDB backend */
#undef SLAPD_HDB_DYNAMIC
/* define to support LDAP backend */
#undef SLAPD_LDAP
/* define to support dynamic LDAP backend */
#undef SLAPD_LDAP_DYNAMIC
/* define to support LDBM backend */
#undef SLAPD_LDBM
/* define to support dynamic LDBM backend */
#undef SLAPD_LDBM_DYNAMIC
/* define to support LDAP Metadirectory backend */
#undef SLAPD_META
/* define to support dynamic LDAP Metadirectory backend */
#undef SLAPD_META_DYNAMIC
/* define to support cn=Monitor backend */
#undef SLAPD_MONITOR
/* define to support dynamic cn=Monitor backend */
#undef SLAPD_MONITOR_DYNAMIC
/* define to support NULL backend */
#undef SLAPD_NULL
/* define to support dynamic NULL backend */
#undef SLAPD_NULL_DYNAMIC
/* define to support PASSWD backend */
#undef SLAPD_PASSWD
/* define to support dynamic PASSWD backend */
#undef SLAPD_PASSWD_DYNAMIC
/* define to support PERL backend */
#undef SLAPD_PERL
/* define to support dynamic PERL backend */
#undef SLAPD_PERL_DYNAMIC
/* define to support relay backend */
#undef SLAPD_RELAY
/* define to support dynamic relay backend */
#undef SLAPD_RELAY_DYNAMIC
/* define to support SHELL backend */
#undef SLAPD_SHELL
/* define to support dynamic SHELL backend */
#undef SLAPD_SHELL_DYNAMIC
/* define to support SQL backend */
#undef SLAPD_SQL
/* define to support dynamic SQL backend */
#undef SLAPD_SQL_DYNAMIC
/* define for Dynamic Group overlay */
#undef SLAPD_OVER_CHAIN
......
......@@ -553,8 +553,8 @@ bdb_db_destroy( BackendDB *be )
return 0;
}
#if (defined(SLAPD_BDB_DYNAMIC) && !defined(BDB_HIER)) || \
(defined(SLAPD_HDB_DYNAMIC) && defined(BDB_HIER))
#if (SLAPD_BDB == SLAPD_MOD_DYNAMIC && !defined(BDB_HIER)) || \
(SLAPD_HDB == SLAPD_MOD_DYNAMIC && defined(BDB_HIER))
int init_module( int argc, char *argv[] ) {
BackendInfo bi;
......@@ -569,7 +569,7 @@ int init_module( int argc, char *argv[] ) {
backend_add( &bi );
return 0;
}
#endif /* SLAPD_BDB_DYNAMIC */
#endif /* SLAPD_BDB */
int
bdb_initialize(
......
......@@ -28,7 +28,7 @@
#include "slap.h"
#include "external.h"
#ifdef SLAPD_DNSSRV_DYNAMIC
#if SLAPD_DNSSRV == SLAPD_MOD_DYNAMIC
int init_module(int argc, char *argv[])
{
......@@ -42,7 +42,7 @@ int init_module(int argc, char *argv[])
return 0;
}
#endif /* SLAPD_DNSSRV_DYNAMIC */
#endif /* SLAPD_DNSSRV */
int
dnssrv_back_initialize(
......
......@@ -31,7 +31,7 @@
#include "slap.h"
#include "back-ldap.h"
#ifdef SLAPD_LDAP_DYNAMIC
#if SLAPD_LDAP == SLAPD_MOD_DYNAMIC
int init_module(int argc, char *argv[]) {
BackendInfo bi;
......@@ -44,7 +44,7 @@ int init_module(int argc, char *argv[]) {
return 0;
}
#endif /* SLAPD_LDAP_DYNAMIC */
#endif /* SLAPD_LDAP */
int
ldap_back_initialize(
......
......@@ -24,7 +24,7 @@
#include "slap.h"
#include "back-ldbm.h"
#ifdef SLAPD_LDBM_DYNAMIC
#if SLAPD_LDBM == SLAPD_MOD_DYNAMIC
int init_module(int argc, char *argv[]) {
BackendInfo bi;
......@@ -37,7 +37,7 @@ int init_module(int argc, char *argv[]) {
return 0;
}
#endif /* SLAPD_LDBM_DYNAMIC */
#endif /* SLAPD_LDBM */
int
ldbm_back_initialize(
......
......@@ -26,7 +26,7 @@
#include "../back-ldap/back-ldap.h"
#include "back-meta.h"
#ifdef SLAPD_META_DYNAMIC
#if SLAPD_META == SLAPD_MOD_DYNAMIC
int
init_module( int argc, char *argv[] ) {
......@@ -40,7 +40,7 @@ init_module( int argc, char *argv[] ) {
return 0;
}
#endif /* SLAPD_META_DYNAMIC */
#endif /* SLAPD_META */
int
meta_back_initialize(
......
......@@ -147,7 +147,7 @@ struct monitorsubsys monitor_subsys[] = {
}, { -1, NULL }
};
#ifdef SLAPD_MONITOR_DYNAMIC
#if SLAPD_MONITOR == SLAPD_MOD_DYNAMIC
int
init_module( int argc, char *argv[] )
......@@ -161,7 +161,7 @@ init_module( int argc, char *argv[] )
return 0;
}
#endif /* SLAPD_MONITOR_DYNAMIC */
#endif /* SLAPD_MONITOR */
int
monitor_back_initialize(
......
......@@ -156,8 +156,8 @@ null_back_initialize(
return 0;
}
#ifdef SLAPD_NULL_DYNAMIC
int back_null_LTX_init_module(
#if SLAPD_NULL == SLAPD_MOD_DYNAMIC
int init_module(
int argc,
char *argv[] )
{
......@@ -170,4 +170,4 @@ int back_null_LTX_init_module(
backend_add(&bi);
return 0;
}
#endif /* SLAPD_NULL_DYNAMIC */
#endif /* SLAPD_NULL */
......@@ -25,7 +25,7 @@
ldap_pvt_thread_mutex_t passwd_mutex;
#ifdef SLAPD_PASSWD_DYNAMIC
#if SLAPD_PASSWD == SLAPD_MOD_DYNAMIC
int init_module(int argc, char *argv[]) {
BackendInfo bi;
......@@ -38,7 +38,7 @@ int init_module(int argc, char *argv[]) {
return 0;
}
#endif /* SLAPD_PASSWD_DYNAMIC */
#endif /* SLAPD_PASSWD */
int
passwd_back_initialize(
......
......@@ -38,7 +38,7 @@ EXT void boot_DynaLoader LDAP_P((PERL_BACK_BOOT_DYNALOADER_PARAMS));
PerlInterpreter *PERL_INTERPRETER = NULL;
ldap_pvt_thread_mutex_t perl_interpreter_mutex;
#ifdef SLAPD_PERL_DYNAMIC
#if SLAPD_PERL == SLAPD_MOD_DYNAMIC
int init_module(int argc, char *argv[])
{
......@@ -52,7 +52,7 @@ int init_module(int argc, char *argv[])
return 0;
}
#endif /* SLAPD_PERL_DYNAMIC */
#endif /* SLAPD_PERL */
/**********************************************************
......
......@@ -25,7 +25,7 @@
#include "slap.h"
#include "back-relay.h"
#ifdef SLAPD_RELAY_DYNAMIC
#if SLAPD_RELAY == SLAPD_MOD_DYNAMIC
int
init_module( int argc, char *argv[] ) {
......@@ -39,7 +39,7 @@ init_module( int argc, char *argv[] ) {
return 0;
}
#endif /* SLAPD_RELAY_DYNAMIC */
#endif /* SLAPD_RELAY */
int
relay_back_initialize( BackendInfo *bi )
......
......@@ -37,7 +37,7 @@
#include "slap.h"
#include "shell.h"
#ifdef SLAPD_SHELL_DYNAMIC
#if SLAPD_SHELL == SLAPD_MOD_DYNAMIC
int init_module(int argc, char *argv[]) {
BackendInfo bi;
......@@ -50,7 +50,7 @@ int init_module(int argc, char *argv[]) {
return 0;
}
#endif /* SLAPD_SHELL_DYNAMIC */
#endif /* SLAPD_SHELL */
int
shell_back_initialize(
......
......@@ -29,7 +29,7 @@
#include "ldap_pvt.h"
#include "proto-sql.h"
#ifdef SLAPD_SQL_DYNAMIC
#if SLAPD_SQL == SLAPD_MOD_DYNAMIC
int
init_module(
......@@ -46,7 +46,7 @@ init_module(
return 0;
}
#endif /* SLAPD_SQL_DYNAMIC */
#endif /* SLAPD_SQL */
int
sql_back_initialize(
......
......@@ -51,97 +51,97 @@
* imported into slapd without appropriate __declspec(dllimport) directives.
*/
#if defined(SLAPD_BDB) && !defined(SLAPD_BDB_DYNAMIC)
#if SLAPD_BDB == SLAPD_MOD_STATIC
#include "back-bdb/external.h"
#endif
#if defined(SLAPD_DNSSRV) && !defined(SLAPD_DNSSRV_DYNAMIC)
#if SLAPD_DNSSRV == SLAPD_MOD_STATIC
#include "back-dnssrv/external.h"
#endif
#if defined(SLAPD_HDB) && !defined(SLAPD_HDB_DYNAMIC)
#if SLAPD_HDB == SLAPD_MOD_STATIC
#include "back-hdb/external.h"
#endif
#if defined(SLAPD_LDAP) && !defined(SLAPD_LDAP_DYNAMIC)
#if SLAPD_LDAP == SLAPD_MOD_STATIC
#include "back-ldap/external.h"
#endif
#if defined(SLAPD_LDBM) && !defined(SLAPD_LDBM_DYNAMIC)
#if SLAPD_LDBM == SLAPD_MOD_STATIC
#include "back-ldbm/external.h"
#endif
#if defined(SLAPD_META) && !defined(SLAPD_META_DYNAMIC)
#if SLAPD_META == SLAPD_MOD_STATIC
#include "back-meta/external.h"
#endif
#if defined(SLAPD_MONITOR) && !defined(SLAPD_MONITOR_DYNAMIC)
#if SLAPD_MONITOR == SLAPD_MOD_STATIC
#include "back-monitor/external.h"
#endif
#if defined(SLAPD_NULL) && !defined(SLAPD_NULL_DYNAMIC)
#if SLAPD_NULL == SLAPD_MOD_STATIC
#include "back-null/external.h"
#endif
#if defined(SLAPD_PASSWD) && !defined(SLAPD_PASSWD_DYNAMIC)
#if SLAPD_PASSWD == SLAPD_MOD_STATIC
#include "back-passwd/external.h"
#endif
#if defined(SLAPD_PERL) && !defined(SLAPD_PERL_DYNAMIC)
#if SLAPD_PERL == SLAPD_MOD_STATIC
#include "back-perl/external.h"
#endif
#if defined(SLAPD_RELAY) && !defined(SLAPD_RELAY_DYNAMIC)
#if SLAPD_RELAY == SLAPD_MOD_STATIC
#include "back-relay/external.h"
#endif
#if defined(SLAPD_SHELL) && !defined(SLAPD_SHELL_DYNAMIC)
#if SLAPD_SHELL == SLAPD_MOD_STATIC
#include "back-shell/external.h"
#endif
#if defined(SLAPD_TCL) && !defined(SLAPD_TCL_DYNAMIC)
#if SLAPD_TCL == SLAPD_MOD_STATIC
#include "back-tcl/external.h"
#endif
#if defined(SLAPD_SQL) && !defined(SLAPD_SQL_DYNAMIC)
#if SLAPD_SQL == SLAPD_MOD_STATIC
#include "back-sql/external.h"
#endif
#if defined(SLAPD_PRIVATE) && !defined(SLAPD_PRIVATE_DYNAMIC)
#if SLAPD_PRIVATE == SLAPD_MOD_STATIC
#include "private/external.h"
#endif
static BackendInfo binfo[] = {
#if defined(SLAPD_BDB) && !defined(SLAPD_BDB_DYNAMIC)
#if SLAPD_BDB == SLAPD_MOD_STATIC
{"bdb", bdb_initialize},
#endif
#if defined(SLAPD_DNSSRV) && !defined(SLAPD_DNSSRV_DYNAMIC)
#if SLAPD_DNSSRV == SLAPD_MOD_STATIC
{"dnssrv", dnssrv_back_initialize},
#endif
#if defined(SLAPD_HDB) && !defined(SLAPD_HDB_DYNAMIC)
#if SLAPD_HDB == SLAPD_MOD_STATIC
{"hdb", hdb_initialize},
#endif
#if defined(SLAPD_LDAP) && !defined(SLAPD_LDAP_DYNAMIC)
#if SLAPD_LDAP == SLAPD_MOD_STATIC
{"ldap", ldap_back_initialize},
#endif
#if defined(SLAPD_LDBM) && !defined(SLAPD_LDBM_DYNAMIC)
#if SLAPD_LDBM == SLAPD_MOD_STATIC
{"ldbm", ldbm_back_initialize},
#endif
#if defined(SLAPD_META) && !defined(SLAPD_META_DYNAMIC)
#if SLAPD_META == SLAPD_MOD_STATIC
{"meta", meta_back_initialize},
#endif
#if defined(SLAPD_MONITOR) && !defined(SLAPD_MONITOR_DYNAMIC)
#if SLAPD_MONITOR == SLAPD_MOD_STATIC
{"monitor", monitor_back_initialize},
#endif
#if defined(SLAPD_NULL) && !defined(SLAPD_NULL_DYNAMIC)
#if SLAPD_NULL == SLAPD_MOD_STATIC
{"null", null_back_initialize},
#endif
#if defined(SLAPD_PASSWD) && !defined(SLAPD_PASSWD_DYNAMIC)
#if SLAPD_PASSWD == SLAPD_MOD_STATIC
{"passwd", passwd_back_initialize},
#endif
#if defined(SLAPD_PERL) && !defined(SLAPD_PERL_DYNAMIC)
#if SLAPD_PERL == SLAPD_MOD_STATIC
{"perl", perl_back_initialize},
#endif
#if defined(SLAPD_RELAY) && !defined(SLAPD_RELAY_DYNAMIC)
#if SLAPD_RELAY == SLAPD_MOD_STATIC
{"relay", relay_back_initialize},
#endif
#if defined(SLAPD_SHELL) && !defined(SLAPD_SHELL_DYNAMIC)
#if SLAPD_SHELL == SLAPD_MOD_STATIC
{"shell", shell_back_initialize},
#endif
#if defined(SLAPD_TCL) && !defined(SLAPD_TCL_DYNAMIC)
#if SLAPD_TCL == SLAPD_MOD_STATIC
{"tcl", tcl_back_initialize},
#endif
#if defined(SLAPD_SQL) && !defined(SLAPD_SQL_DYNAMIC)
#if SLAPD_SQL == SLAPD_MOD_STATIC
{"sql", sql_back_initialize},
#endif
/* for any private backend */
#if defined(SLAPD_PRIVATE) && !defined(SLAPD_PRIVATE_DYNAMIC)
#if SLAPD_PRIVATE == SLAPD_MOD_STATIC
{"private", private_back_initialize},
#endif
{NULL}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment