From aaf253318b00e518e0a1dc50a036b8b003693e82 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 10 Feb 2003 02:09:00 +0000 Subject: [PATCH] Move include behind #ifdef --- servers/slapd/add.c | 2 +- servers/slapd/back-monitor/database.c | 2 +- servers/slapd/backend.c | 5 ++++- servers/slapd/bind.c | 2 ++ servers/slapd/compare.c | 2 ++ servers/slapd/config.c | 2 ++ servers/slapd/delete.c | 3 +++ servers/slapd/extended.c | 5 ++++- servers/slapd/main.c | 5 ++++- servers/slapd/modify.c | 2 ++ servers/slapd/modrdn.c | 2 ++ servers/slapd/operation.c | 3 +++ servers/slapd/result.c | 3 +++ servers/slapd/root_dse.c | 5 ++++- servers/slapd/search.c | 2 +- 15 files changed, 38 insertions(+), 7 deletions(-) diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 2e11d80360..d0b393d364 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -24,9 +24,9 @@ #include "ldap_pvt.h" #include "slap.h" -#include "slapi.h" #ifdef LDAP_SLAPI +#include "slapi.h" static Slapi_PBlock *initAddPlugin( Backend *be, Connection *conn, Operation *op, struct berval *dn, Entry *e, int manageDSAit ); static int doPreAddPluginFNs( Backend *be, Slapi_PBlock *pb ); diff --git a/servers/slapd/back-monitor/database.c b/servers/slapd/back-monitor/database.c index ac2d4fccf3..9620419652 100644 --- a/servers/slapd/back-monitor/database.c +++ b/servers/slapd/back-monitor/database.c @@ -36,10 +36,10 @@ #include #include "slap.h" -#include "slapi.h" #include "back-monitor.h" #if defined(LDAP_SLAPI) +#include "slapi.h" static int monitor_back_add_plugin( Backend *be, Entry *e ); #endif /* defined(LDAP_SLAPI) */ diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 679fceba7e..6586e3020f 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -15,10 +15,13 @@ #include #include "slap.h" -#include "slapi.h" #include "lutil.h" #include "lber_pvt.h" +#ifdef LDAP_SLAPI +#include "slapi.h" +#endif + /* * If a module is configured as dynamic, its header should not * get included into slapd. While this is a general rule and does diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index 34e18e58e8..f27b35503e 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -26,7 +26,9 @@ #include "ldap_pvt.h" #include "slap.h" +#ifdef LDAP_SLAPI #include "slapi.h" +#endif int diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index b9c88d8d29..67651aa877 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -22,7 +22,9 @@ #include "ldap_pvt.h" #include "slap.h" +#ifdef LDAP_SLAPI #include "slapi.h" +#endif static int compare_entry( Connection *conn, diff --git a/servers/slapd/config.c b/servers/slapd/config.c index c83f13148a..ac10f94a89 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -18,7 +18,9 @@ #include "lutil.h" #include "ldap_pvt.h" #include "slap.h" +#ifdef LDAP_SLAPI #include "slapi.h" +#endif #define ARGS_STEP 512 diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index 02d37bd422..89d3a8d49f 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -24,7 +24,10 @@ #include "ldap_pvt.h" #include "slap.h" + +#ifdef LDAP_SLAPI #include "slapi.h" +#endif int do_delete( diff --git a/servers/slapd/extended.c b/servers/slapd/extended.c index 8801a55984..e4ae486342 100644 --- a/servers/slapd/extended.c +++ b/servers/slapd/extended.c @@ -33,9 +33,12 @@ #include #include "slap.h" -#include "slapi.h" #include "lber_pvt.h" +#ifdef LDAP_SLAPI +#include "slapi.h" +#endif + #define UNSUPPORTED_EXTENDEDOP "unsupported extended operation" static struct extop_list { diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 412d12438b..10ab52ae2c 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -17,10 +17,13 @@ #include "ldap_pvt.h" #include "slap.h" -#include "slapi.h" #include "lutil.h" #include "ldif.h" +#ifdef LDAP_SLAPI +#include "slapi.h" +#endif + #ifdef LDAP_SIGCHLD static RETSIGTYPE wait4child( int sig ); #endif diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index d57a9b7ca1..44c9da2be8 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -27,7 +27,9 @@ #include "ldap_pvt.h" #include "slap.h" +#ifdef LDAP_SLAPI #include "slapi.h" +#endif int do_modify( diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index f496b92a35..d2c11b96b1 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -37,7 +37,9 @@ #include "ldap_pvt.h" #include "slap.h" +#ifdef LDAP_SLAPI #include "slapi.h" +#endif int do_modrdn( diff --git a/servers/slapd/operation.c b/servers/slapd/operation.c index 42f52b2c71..2a8da886da 100644 --- a/servers/slapd/operation.c +++ b/servers/slapd/operation.c @@ -13,7 +13,10 @@ #include #include "slap.h" + +#ifdef LDAP_SLAPI #include "slapi.h" +#endif void diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 77ab2c0607..bfda458460 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -17,7 +17,10 @@ #include #include "slap.h" + +#ifdef LDAP_SLAPI #include "slapi.h" +#endif static char *v2ref( BerVarray ref, const char *text ) { diff --git a/servers/slapd/root_dse.c b/servers/slapd/root_dse.c index b9c7f35e80..f61a36c362 100644 --- a/servers/slapd/root_dse.c +++ b/servers/slapd/root_dse.c @@ -17,10 +17,13 @@ #include #include "slap.h" -#include "slapi.h" #include #include "lber_pvt.h" +#ifdef LDAP_SLAPI +#include "slapi.h" +#endif + static struct berval supportedFeatures[] = { BER_BVC(LDAP_FEATURE_ALL_OPERATIONAL_ATTRS), /* all Operational Attributes ("+") */ BER_BVC(LDAP_FEATURE_OBJECTCLASS_ATTRS), /* OCs in Attributes List */ diff --git a/servers/slapd/search.c b/servers/slapd/search.c index fcac37b3cc..fd7ea25a02 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -25,9 +25,9 @@ #include "ldap_pvt.h" #include "lutil.h" #include "slap.h" -#include "slapi.h" #ifdef LDAP_SLAPI +#include "slapi.h" static char **anlist2charray( AttributeName *an ); static Slapi_PBlock *initSearchPlugin( Backend *be, Connection *conn, Operation *op, struct berval *base, int scope, int deref, int sizelimit, int timelimit, -- 2.39.5