From kde-bugs-dist Thu May 24 15:26:08 2007 From: Szombathelyi "György" Date: Thu, 24 May 2007 15:26:08 +0000 To: kde-bugs-dist Subject: [Bug 145501] cmake error on Solaris in kdepimlibs with ldap/lber Message-Id: <20070524152608.30279.qmail () ktown ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=118002038122997 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. http://bugs.kde.org/show_bug.cgi?id=145501 ------- Additional Comments From gyurco freemail hu 2007-05-24 17:26 ------- SVN commit 667954 by gyurco: Check for some more ldap_ functions. CCBUG: 145501 M +3 -0 CMakeLists.txt M +3 -0 kldap_config.h.cmake M +4 -0 ldapconnection.cpp M +10 -0 ldapoperation.cpp --- trunk/KDE/kdepimlibs/kldap/CMakeLists.txt #667953:667954 @ -22,6 +22,9 @ check_function_exists(ldap_start_tls_s HAVE_LDAP_START_TLS_S) check_function_exists(ldap_initialize HAVE_LDAP_INITIALIZE) check_function_exists(ber_memfree HAVE_BER_MEMFREE) +check_function_exists(ldap_unbind_ext HAVE_LDAP_UNBIND_EXT) +check_function_exists(ldap_extended_operation HAVE_LDAP_EXTENDED_OPERATION) +check_function_exists(ldap_extended_operation_s HAVE_LDAP_EXTENDED_OPERATION_S) endif (LDAP_FOUND) --- trunk/KDE/kdepimlibs/kldap/kldap_config.h.cmake #667953:667954 @ -4,3 +4,6 @ #cmakedefine HAVE_LDAP_START_TLS_S #cmakedefine HAVE_LDAP_INITIALIZE #cmakedefine HAVE_BER_MEMFREE +#cmakedefine HAVE_LDAP_UNBIND_EXT +#cmakedefine HAVE_LDAP_EXTENDED_OPERATION +#cmakedefine HAVE_LDAP_EXTENDED_OPERATION_S --- trunk/KDE/kdepimlibs/kldap/ldapconnection.cpp #667953:667954 @ -366,7 +366,11 @ void LdapConnection::close() { if ( d->mLDAP ) { +#ifdef HAVE_LDAP_UNBIND_EXT ldap_unbind_ext( d->mLDAP, 0, 0 ); +#else + ldap_unbind( d->mLDAP ); +#endif } d->mLDAP = 0; kDebug(5322) << "connection closed!" << endl; --- trunk/KDE/kdepimlibs/kldap/ldapoperation.cpp #667953:667954 @ -743,6 +743,10 @ int LdapOperation::exop( const QString &oid, const QByteArray &data ) { Q_ASSERT( d->mConnection ); +#ifndef HAVE_LDAP_EXTENDED_OPERATION + kError() << "Your LDAP client libraries don't support extended operations." << endl; + return -1; +#else LDAP *ld = (LDAP*) d->mConnection->handle(); int msgid; @ -768,10 +772,15 @ retval = msgid; } return retval; +#endif } int LdapOperation::exop_s( const QString &oid, const QByteArray &data ) { +#ifndef HAVE_LDAP_EXTENDED_OPERATION_S + kError() << "Your LDAP client libraries don't support extended operations." << endl; + return -1; +#else Q_ASSERT( d->mConnection ); LDAP *ld = (LDAP*) d->mConnection->handle(); BerValue *retdata; @ -798,6 +807,7 @ ldap_controls_free( clientctrls ); return retval; +#endif } int LdapOperation::abandon( int id )