[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: compiling openldap2.0.11 with BerkeleyDB 3.3.11



Hi Matthias,

A patch similar to the attached one has already been applied to the
main CVS branch.

Regards,
    Konstantin.

"Wald, Matthias" wrote:

> I compiled 2.0.11 with db-3.3.11 (Windows). For this
> to work the file ldbm.c has to be patched a littlebit.
>
> >From BerkeleyDB version 3.2.9 to 3.3.11 they changed
> the db->set_malloc function to db->set_alloc.
> db->set_alloc now has 4 parameters with user supplied
> functions for realloc and free. So I added these little
> wrappers:
>
> everything works fine for me until now.
>
> Will this be integrated? Who does it and includes some version
> checking with macros?
>

--
         * *       Konstantin Chuguev           Francis House
      *      *     Application Engineer         112 Hills Road
    *              Tel: +44 1223 302992         Cambridge CB2 1PQ
D  A  N  T  E      WWW: http://www.dante.net    United Kingdom


--- libraries/libldbm/ldbm.c.orig	Fri May 18 00:20:27 2001
+++ libraries/libldbm/ldbm.c	Tue Aug 28 18:05:05 2001
@@ -246,7 +246,11 @@
        }
 
        ret->set_pagesize( ret, DEFAULT_DB_PAGE_SIZE );
-       ret->set_malloc( ret, ldbm_malloc );
+#if DB_VERSION_MINOR >= 3
+	ret->set_alloc( ret, ldbm_malloc, NULL, NULL );
+#else
+	ret->set_malloc( ret, ldbm_malloc );
+#endif
 
        err = ret->open( ret, name, NULL, DB_TYPE, rw, mode);
        LDBM_UNLOCK;