]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/debug.h
Entry rwlock is no longer needed as concurrency is managed
[openldap] / contrib / ldapc++ / src / debug.h
index 13cf128b3b59ec71ae3adefab5413cc9d2b5c93c..c400a4b0a9fb5a532469fc2f40cc082a40d028cf 100644 (file)
@@ -6,27 +6,27 @@
 #ifndef DEBUG_H
 #define DEBUG_H
 #include <iostream>
-
+#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 -1
+#define LDAP_DEBUG_ANY          0xffff 
 
 #define DEBUGLEVEL LDAP_DEBUG_ANY
 
 #define PRINT_FILE     \
-       cerr << "file: " __FILE__  << " line: " << __LINE__ 
+       std::cerr << "file: " __FILE__  << " line: " << __LINE__ 
 
+#ifdef WITH_DEBUG
 #define DEBUG(level, arg)       \
     if((level) & DEBUGLEVEL){     \
-        cerr  << arg ;          \
+        std::cerr  << arg ;          \
     } 
-
-/*
-*      #undef DEBUG
-*      #define DEBUG(level,arg)
-*/
+#else
+#undef DEBUG
+#define DEBUG(level,arg)
+#endif //WITH_DEBUG
 
 #endif // DEBUG_H