From: Ralf Haferkamp Date: Wed, 11 Oct 2000 17:18:27 +0000 (+0000) Subject: - fixed bug in debugging output (added #include "config.h" to debug.h) X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1777 X-Git-Url: https://git.sur5r.net/?p=openldap;a=commitdiff_plain;h=e7dc46c01ec4bc610791b4cb69303ec95fc73eb2 - fixed bug in debugging output (added #include "config.h" to debug.h) - rebuild configure script --- diff --git a/contrib/ldapc++/configure b/contrib/ldapc++/configure index 7a697fcb87..6d7e7efc5c 100755 --- a/contrib/ldapc++/configure +++ b/contrib/ldapc++/configure @@ -1627,6 +1627,10 @@ if test "${enable_debug+set}" = set; then EOF +else + + CXXFLAGS="-O0" + fi @@ -1659,7 +1663,7 @@ else fi echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6 -echo "configure:1663: checking for main in -lresolv" >&5 +echo "configure:1667: checking for main in -lresolv" >&5 ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1667,14 +1671,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1702,7 +1706,7 @@ else fi echo $ac_n "checking for ber_strdup in -llber""... $ac_c" 1>&6 -echo "configure:1706: checking for ber_strdup in -llber" >&5 +echo "configure:1710: checking for ber_strdup in -llber" >&5 ac_lib_var=`echo lber'_'ber_strdup | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1710,7 +1714,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llber $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1749,7 +1753,7 @@ else fi echo $ac_n "checking for ldap_add_ext in -lldap""... $ac_c" 1>&6 -echo "configure:1753: checking for ldap_add_ext in -lldap" >&5 +echo "configure:1757: checking for ldap_add_ext in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_add_ext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1759,7 +1763,7 @@ LIBS="-lldap -llber $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1798,12 +1802,12 @@ else fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1802: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1806: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1812,7 +1816,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1833,7 +1837,7 @@ EOF fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1837: checking how to run the C preprocessor" >&5 +echo "configure:1841: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1848,13 +1852,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1865,13 +1869,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1882,13 +1886,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1914,17 +1918,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ldap.h""... $ac_c" 1>&6 -echo "configure:1918: checking for ldap.h" >&5 +echo "configure:1922: checking for ldap.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1946,7 +1950,7 @@ else fi cat > conftest.$ac_ext < EOF @@ -1968,17 +1972,17 @@ rm -f conftest* ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for lber.h""... $ac_c" 1>&6 -echo "configure:1972: checking for lber.h" >&5 +echo "configure:1976: checking for lber.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2000,7 +2004,7 @@ else fi cat > conftest.$ac_ext < EOF diff --git a/contrib/ldapc++/configure.in b/contrib/ldapc++/configure.in index f7d8e3f5e9..1ab6afc4ac 100644 --- a/contrib/ldapc++/configure.in +++ b/contrib/ldapc++/configure.in @@ -24,7 +24,9 @@ dnl AC_PROG_MAKE_SET AC_ARG_ENABLE(debug,--enable-debug,[ CXXFLAGS="-g -O0 -Wall" AC_DEFINE(WITH_DEBUG) - ] + ],[ + CXXFLAGS="-O0" + ] ) AC_ARG_WITH(libldap,[ --with-libldap=DIR Path to the libldap library [/usr/local/lib]],[ diff --git a/contrib/ldapc++/src/LDAPAttribute.cpp b/contrib/ldapc++/src/LDAPAttribute.cpp index a3200dd4b5..cf71694685 100644 --- a/contrib/ldapc++/src/LDAPAttribute.cpp +++ b/contrib/ldapc++/src/LDAPAttribute.cpp @@ -12,7 +12,7 @@ #include -#include +//#include #include "debug.h" #include "StringList.h" diff --git a/contrib/ldapc++/src/LDAPModifyRequest.cpp b/contrib/ldapc++/src/LDAPModifyRequest.cpp index 032216a25d..7e8f41de86 100644 --- a/contrib/ldapc++/src/LDAPModifyRequest.cpp +++ b/contrib/ldapc++/src/LDAPModifyRequest.cpp @@ -5,7 +5,7 @@ #include -#include +#include "debug.h" #include "LDAPModifyRequest.h" #include "LDAPException.h" diff --git a/contrib/ldapc++/src/LDAPSearchResult.cpp b/contrib/ldapc++/src/LDAPSearchResult.cpp index 94d5988ff3..4eccaa5bdd 100644 --- a/contrib/ldapc++/src/LDAPSearchResult.cpp +++ b/contrib/ldapc++/src/LDAPSearchResult.cpp @@ -7,7 +7,7 @@ #include #include "debug.h" -#include"LDAPSearchResult.h" +#include "LDAPSearchResult.h" #include "LDAPRequest.h" LDAPSearchResult::LDAPSearchResult(const LDAPRequest *req, diff --git a/contrib/ldapc++/src/debug.h b/contrib/ldapc++/src/debug.h index 8a5b14e317..e9160befd2 100644 --- a/contrib/ldapc++/src/debug.h +++ b/contrib/ldapc++/src/debug.h @@ -6,13 +6,13 @@ #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 -1 +#define LDAP_DEBUG_ANY 0xffff #define DEBUGLEVEL LDAP_DEBUG_ANY diff --git a/contrib/ldapc++/src/main.cpp b/contrib/ldapc++/src/main.cpp index 595941e29c..8fff4d4a1e 100644 --- a/contrib/ldapc++/src/main.cpp +++ b/contrib/ldapc++/src/main.cpp @@ -35,6 +35,7 @@ int main(){ LDAPAttributeList* attrs=new LDAPAttributeList(); StringList values; + StringList s2; values.add("top"); values.add("Person"); attrs->addAttribute(LDAPAttribute("objectClass",values));