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

compiling openldap2.0.11 with BerkeleyDB 3.3.11



Hello all,

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:

void *
ldbm_realloc(void *memblock, size_t size )
{
	return( realloc( memblock, size ));
}

void
ldbm_free(void *memblock)
{
	free(memblock);
}

to the existing function

void *
ldbm_malloc( size_t size )
{
	return( calloc( 1, size ));
}

and changed the call 
	ret->set_malloc( ret, ldbm_malloc );
to
	ret->set_alloc(ret, ldbm_malloc, ldbm_realloc, ldbm_free);

everything works fine for me until now.

Will this be integrated? Who does it and includes some version
checking with macros?

Thanks a lot!

Ciao!
Matthias