From: Kurt Zeilenga Date: Mon, 24 May 1999 21:21:09 +0000 (+0000) Subject: Do not set db_cachesize under BerkeleyDB 2.4. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4b832f1d352208d80e7a91344d9f9ae36a888e5b;p=openldap Do not set db_cachesize under BerkeleyDB 2.4. --- diff --git a/libraries/libldbm/ldbm.c b/libraries/libldbm/ldbm.c index 08c3299520..c399558428 100644 --- a/libraries/libldbm/ldbm.c +++ b/libraries/libldbm/ldbm.c @@ -169,8 +169,19 @@ ldbm_open( char *name, int rw, int mode, int dbcachesize ) DB_INFO dbinfo; memset( &dbinfo, 0, sizeof( dbinfo )); + +#if defined( DB_VERSION_MAJOR ) && defined( DB_VERSION_MINOR ) && \ + DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 4 + /* + * BerkeleyDB 2.4 do not allow db_cachesize + * to be specified if an DB_ENV is. + */ +#else + /* set db_cachesize of MPOOL is NOT being used. */ if (( ldbm_Env == NULL ) || ( ldbm_Env->mp_info == NULL )) dbinfo.db_cachesize = dbcachesize; +#endif + dbinfo.db_pagesize = DEFAULT_DB_PAGE_SIZE; dbinfo.db_malloc = ldbm_malloc;