]> git.sur5r.net Git - openldap/commitdiff
Do not set db_cachesize under BerkeleyDB 2.4.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 24 May 1999 21:21:09 +0000 (21:21 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 24 May 1999 21:21:09 +0000 (21:21 +0000)
libraries/libldbm/ldbm.c

index 08c3299520ba9dff61acf4604ca433df29790a4b..c39955842898a0e6ec30363132ff36a883534920 100644 (file)
@@ -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;