From 7731832751ab9f3c6ddeb66f186d3d7fa1934a6d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 13:11:40 +0200 Subject: Adding upstream version 2.4.57+dfsg. Signed-off-by: Daniel Baumann --- contrib/ldapc++/src/debug.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 contrib/ldapc++/src/debug.h (limited to 'contrib/ldapc++/src/debug.h') diff --git a/contrib/ldapc++/src/debug.h b/contrib/ldapc++/src/debug.h new file mode 100644 index 0000000..fb89cde --- /dev/null +++ b/contrib/ldapc++/src/debug.h @@ -0,0 +1,33 @@ +// $OpenLDAP$ +/* + * Copyright 2000-2021 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#ifndef DEBUG_H +#define DEBUG_H +#include +#include "config.h" +#define LDAP_DEBUG_NONE 0x0000 +#define LDAP_DEBUG_TRACE 0x0001 +#define LDAP_DEBUG_CONSTRUCT 0x0002 +#define LDAP_DEBUG_DESTROY 0x0004 +#define LDAP_DEBUG_PARAMETER 0x0008 +#define LDAP_DEBUG_ANY 0xffff + +#define DEBUGLEVEL LDAP_DEBUG_ANY + +#define PRINT_FILE \ + std::cerr << "file: " __FILE__ << " line: " << __LINE__ + +#ifdef WITH_DEBUG +#define DEBUG(level, arg) \ + if((level) & DEBUGLEVEL){ \ + std::cerr << arg ; \ + } +#else +#undef DEBUG +#define DEBUG(level,arg) +#endif //WITH_DEBUG + +#endif // DEBUG_H -- cgit v1.2.3