[Bug 145501] cmake error on Solaris in kdepimlibs with ldap/lber

Szombathelyi György gyurco at freemail.hu
Mon May 21 19:48:51 BST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=145501         




------- Additional Comments From gyurco freemail hu  2007-05-21 20:48 -------
SVN commit 667062 by gyurco:

- Added some macros - Solaris needs them - What's BC31?
- replace ber_memvfree - seems OpenLDAP specific
- Also remove 'W' format string from ber_scanf, also OpenLDAP specific

CCBUG: 145501


 M  +16 -18    ber.cpp  
 M  +1 -1      ber.h  


--- trunk/KDE/kdepimlibs/kldap/ber.cpp #667061:667062
 @ -30,10 +30,24  @
 #include <cstdarg>
 
 #ifdef LDAP_FOUND
+
+#ifdef Q_OS_SOLARIS
+#define BC31 1
+#endif
+
 #include <lber.h>
 #include <ldap.h>
+
+#ifndef LBER_USE_DER
+#define LBER_USE_DER 1
 #endif
 
+#ifndef ber_memfree
+#define ber_memfree(x) ldap_memfree(x)
+#endif
+
+#endif
+
 using namespace KLDAP;
 
 class Ber::BerPrivate {
 @ -328,9 +342,10  @
             c2 = c;
             while ( *c ) {
               v->append( QByteArray( *c ) );
+              ber_memfree( *c );
               c++;
             }
-            ber_memvfree( (void**) c2 );
+            ber_memfree( c2 );
           }
           break;
         }
 @ -349,23 +364,6  @
           }
           break;
         }
-      case 'W':
-        {
-          QList<QByteArray> *W = va_arg( args, QList<QByteArray> * );
-          BerVarray bv;
-          ret = ber_scanf( d->mBer, fmt, &bv );
-          if ( ret != -1 && bv ) {
-            int j = 0;
-            while ( bv[j].bv_val ) {
-              W->append( QByteArray( bv[j].bv_val, bv[j].bv_len ) );
-              j++;
-            }
-//            ber_bvarray_free( bv );
-          }
-
-          break;
-        }
-//      case 'M': //This is so complicated, I'm lazy to implement. Use the 3 above instead.
       case 'x':
       case 'n':
       case '{':
--- trunk/KDE/kdepimlibs/kldap/ber.h #667061:667062
 @ -94,7 +94,7  @
      *     is provided. This works across calls.
      *   </li>
      *   <li>
-     *     v,V,W  Several octet strings. A QList<QByteArray>* is supplied.
+     *     v,V  Several octet strings. A QList<QByteArray>* is supplied.
      *     Note that a construct like ’{v}’ is required to get an actual
      *     SEQUENCE OF octet strings. Also note that the 'v' format recognizes
      *     the QByteArray only to the first zero character, so it's not



More information about the Kdepim-bugs mailing list