From: Gary Williams Date: Thu, 12 Oct 2000 21:13:56 +0000 (+0000) Subject: change to LDAP_LOG macro X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1766 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e3f70c4a37654447c2883a8f14a9fb0907297265;p=openldap change to LDAP_LOG macro --- diff --git a/include/ldap_log.h b/include/ldap_log.h index 41ec5c9174..b27b1d3215 100644 --- a/include/ldap_log.h +++ b/include/ldap_log.h @@ -93,39 +93,46 @@ LDAP_BEGIN_DECL /* debugging stuff */ #ifdef LDAP_DEBUG -/* - * This is a bogus extern declaration for the compiler. No need to ensure - * a 'proper' dllimport. - */ -#ifndef ldap_debug -extern int ldap_debug; -#endif /* !ldap_debug */ - -#ifdef LDAP_SYSLOG -extern int ldap_syslog; -extern int ldap_syslog_level; -#endif /* LDAP_SYSLOG */ + /* + * This is a bogus extern declaration for the compiler. No need to ensure + * a 'proper' dllimport. + */ +# ifndef ldap_debug + extern int ldap_debug; +# endif /* !ldap_debug */ + +# ifdef LDAP_SYSLOG + extern int ldap_syslog; + extern int ldap_syslog_level; +# endif /* LDAP_SYSLOG */ /* this doesn't below as part of ldap.h */ -#ifdef LDAP_SYSLOG -#define Debug( level, fmt, arg1, arg2, arg3 ) \ +# ifdef LDAP_SYSLOG +# define Debug( level, fmt, arg1, arg2, arg3 ) \ do { \ lutil_debug( ldap_debug, (level), (fmt), (arg1), (arg2), (arg3) ); \ if ( ldap_syslog & (level) ) \ syslog( ldap_syslog_level, (fmt), (arg1), (arg2), (arg3) ); \ } while ( 0 ) -#else -#define Debug( level, fmt, arg1, arg2, arg3 ) \ - lutil_debug( ldap_debug, (level), (fmt), (arg1), (arg2), (arg3) ) +# else +# define Debug( level, fmt, arg1, arg2, arg3 ) \ + lutil_debug( ldap_debug, (level), (fmt), (arg1), (arg2), (arg3) ) +# endif + +#ifndef LDAP_LOG +# define LDAP_LOG(a) lutil_log a #endif #else /* LDAP_DEBUG */ -#define Debug( level, fmt, arg1, arg2, arg3 ) -#endif /* LDAP_DEBUG */ +# define Debug( level, fmt, arg1, arg2, arg3 ) + +#ifndef LDAP_LOG +# define LDAP_LOG(a) +#endif +#endif /* LDAP_DEBUG */ -#define LDAP_LOG(a) lutil_log a LDAP_LUTIL_F(void) lutil_log_initialize(int argc, char **argv); LDAP_LUTIL_F(void) lutil_set_debug_level LDAP_P(( char *subsys, int level ));