#ifdef NEW_LOGGING
extern int ldap_loglevels[LDAP_SUBSYS_NUM];
+
+#ifdef LDAP_DEBUG
+
#define LDAP_LOG(a, b, fmt, arg1, arg2, arg3) do {\
if (ldap_loglevels[LDAP_SUBSYS_##a] >= LDAP_LEVEL_##b || \
ldap_loglevels[LDAP_SUBSYS_GLOBAL] >= LDAP_LEVEL_##b)\
(ldap_loglevels[LDAP_SUBSYS_##a] >= LDAP_LEVEL_##b || \
ldap_loglevels[LDAP_SUBSYS_GLOBAL] >= LDAP_LEVEL_##b)
-#endif /* LDAP_LOG */
+#endif /* LDAP_DEBUG */
+
+#endif /* NEW_LOGGING */
#ifndef LDAP_LOG
#define LDAP_LOG(a, b, fmt, arg1, arg2, arg3)
+#define LDAP_LOGS_TEST(a, b) 0
#endif
LDAP_LUTIL_F(int) lutil_mnem2level LDAP_P(( const char *level ));
#include "ldap_log.h"
#undef Debug
+
+#ifdef LDAP_DEBUG
+
#define Debug( level, fmt, arg1, arg2, arg3 ) \
do { if ( ldap_debug & level ) \
ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) ); \
#define LDAP_Debug( subsystem, level, fmt, arg1, arg2, arg3 )\
ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) )
+#else
+
+#define Debug( level, fmt, arg1, arg2, arg3 ) ((void)0)
+#define LDAP_Debug( subsystem, level, fmt, arg1, arg2, arg3 ) ((void)0)
+
+#endif /* LDAP_DEBUG */
+
#include "ldap.h"
#include "ldap_pvt.h"
* ftp://koobera.math.uic.edu/www/docs/connect.html.
*/
+#ifdef LDAP_DEBUG
+
#define osip_debug(ld,fmt,arg1,arg2,arg3) \
do { \
ldap_log_printf(NULL, LDAP_DEBUG_TRACE, fmt, arg1, arg2, arg3); \
} while(0)
+#else
+
+#define osip_debug(ld,fmt,arg1,arg2,arg3) ((void)0)
+
+#endif /* LDAP_DEBUG */
+
static void
ldap_pvt_set_errno(int err)
{
/* int ldap_int_tblsize = 0; */
+#ifdef LDAP_DEBUG
+
#define oslocal_debug(ld,fmt,arg1,arg2,arg3) \
do { \
ldap_log_printf(ld, LDAP_DEBUG_TRACE, fmt, arg1, arg2, arg3); \
} while(0)
+#else
+
+#define oslocal_debug(ld,fmt,arg1,arg2,arg3) ((void)0)
+
+#endif /* LDAP_DEBUG */
+
static void
ldap_pvt_set_errno(int err)
{