#define LogTest(level) ( 0 )
#endif /* ! LDAP_DEBUG */
+/* Actually now in liblber/debug.c */
LDAP_LUTIL_F(int) lutil_debug_file LDAP_P(( FILE *file ));
LDAP_LUTIL_F(void) lutil_debug LDAP_P((
int debug, int level,
const char* fmt, ... )) LDAP_GCCATTR((format(printf, 3, 4)));
+#ifdef LDAP_DEFINE_LDAP_DEBUG
+/* This struct matches the head of ldapoptions in <ldap-int.h> */
+struct ldapoptions_prefix {
+ short ldo_valid;
+ int ldo_debug;
+};
+#define ldap_debug \
+ (*(int *) ((char *)&ldap_int_global_options \
+ + offsetof(struct ldapoptions_prefix, ldo_debug)))
+
+struct ldapoptions;
+LDAP_V ( struct ldapoptions ) ldap_int_global_options;
+#endif /* LDAP_DEFINE_LDAP_DEBUG */
+
LDAP_END_DECL
#endif /* LDAP_LOG_H */
* structure representing get/set'able options
* which have global defaults.
* Protect access to this struct with ldo_mutex
+ * ldap_log.h:ldapoptions_prefix must match the head of this struct.
*/
struct ldapoptions {
short ldo_valid;
#include <lber.h>
#include <ldap.h>
-#include "../libldap/ldap-int.h"
+#define LDAP_DEFINE_LDAP_DEBUG
+#include <ldap_log.h>
#include <lutil.h>
#include <avl.h>
#include "slap.h"
#include "back-ldap.h"
#include "lutil.h"
-#undef ldap_debug /* silence a warning in ldap-int.h */
-#include "../../../libraries/libldap/ldap-int.h"
-
#include "lutil_ldap.h"
#define LDAP_CONTROL_OBSOLETE_PROXY_AUTHZ "2.16.840.1.113730.3.4.12"
#include "back-ldap.h"
#include "lutil.h"
#include "ldif.h"
-#undef ldap_debug
-/* for advanced URL parsing */
-#include "../../../libraries/libldap/ldap-int.h"
static SLAP_EXTOP_MAIN_FN ldap_back_exop_whoami;
#include "slap.h"
#include "back-ldap.h"
-#undef ldap_debug /* silence a warning in ldap-int.h */
-#include "../../../libraries/libldap/ldap-int.h"
+#include "../../../libraries/liblber/lber-int.h"
#include "lutil.h"
#include "slap.h"
#include "../back-ldap/back-ldap.h"
#include "back-meta.h"
-#undef ldap_debug /* silence a warning in ldap-int.h */
-#include "../../../libraries/libldap/ldap-int.h"
#include "lutil_ldap.h"
#include "slap.h"
#include "lutil.h"
#include "../back-ldap/back-ldap.h"
-#undef ldap_debug /* silence a warning in ldap-int.h */
-#include "../../../libraries/libldap/ldap-int.h"
#include "back-meta.h"
static int
#include "../back-ldap/back-ldap.h"
#include "back-meta.h"
-#undef ldap_debug /* silence a warning in ldap-int.h */
-#include "../../../libraries/libldap/ldap-int.h"
-
int
mapping_cmp ( const void *c1, const void *c2 )
{
#include "slap.h"
#include "../back-ldap/back-ldap.h"
#include "back-meta.h"
-#undef ldap_debug /* silence a warning in ldap-int.h */
-#include "ldap_log.h"
-#include "../../../libraries/libldap/ldap-int.h"
+#include "../../../libraries/liblber/lber-int.h"
/* IGNORE means that target does not (no longer) participate
* in the search;