diff --git a/build/openldap.m4 b/build/openldap.m4 index eba963945b..1ebdc19f18 100644 --- a/build/openldap.m4 +++ b/build/openldap.m4 @@ -315,20 +315,41 @@ AC_DEFUN([OL_BERKELEY_DB_THREAD], main() { int rc; - u_int32_t flags = DB_CREATE | DB_THREAD; + u_int32_t flags = DB_CREATE | DB_INIT_CDB | DB_INIT_MPOOL | +#ifdef DB_PRIVATE + DB_PRIVATE | +#endif +#ifdef DB_MPOOL_PRIVATE + DB_MPOOL_PRIVATE | +#endif + DB_THREAD; #if DB_VERSION_MAJOR > 2 DB_ENV *env = NULL; rc = db_env_create( &env, 0 ); - if( rc == 0 ) { -#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) - rc = env->open( env, NULL, flags, 0 ); -#else - rc = env->open( env, NULL, NULL, flags, 0 ); + if( rc ) return rc; + +#ifdef DB_CDB_ALLDB + rc = env->set_flags( env, DB_CDB_ALLDB, 1 ); + if( rc ) goto done; +#endif + +#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) + rc = env->open( env, NULL, flags, 0 ); +#else + rc = env->open( env, NULL, NULL, flags, 0 ); +#endif + +#ifdef DB_CDB_ALLDB +done: +#endif +#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) + env->remove( env, NULL, DB_FORCE); +#else + env->remove( env, NULL, NULL, DB_FORCE); #endif - } #else DB_ENV env; @@ -339,13 +360,9 @@ main() if( rc == 0 ) { db_appexit( &env ); } -#endif -#if DB_VERSION_MAJOR > 2 -#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) - env->remove( env, NULL, DB_FORCE); -#else - env->remove( env, NULL, NULL, DB_FORCE); -#endif + + unlink("__db_mpool.share"); + unlink("__db_lock.share"); #endif return rc; diff --git a/build/top.mk b/build/top.mk index 666e7ac0be..461b039bf6 100644 --- a/build/top.mk +++ b/build/top.mk @@ -2,10 +2,11 @@ ## Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA ## All rights reserved. ## -## Redistribution and use in source and binary forms are permitted only -## as authorized by the OpenLDAP Public License. A copy of this -## license is available at http://www.OpenLDAP.org/license.html or -## in file LICENSE in the top-level directory of the distribution. +## Redistribution and use in source and binary forms, with or without +## modification, are permitted only as authorized by the OpenLDAP +## Public License. A copy of this license is available at +## http://www.OpenLDAP.org/license.html or in file LICENSE in the +## top-level directory of the distribution. ## PACKAGE= @PACKAGE@ VERSION= @VERSION@