From: Kurt Zeilenga Date: Thu, 7 Jun 2001 17:23:43 +0000 (+0000) Subject: Rework DB_THREAD test X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1346 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5d1608ac1b807ee0d9167cc0c4bb667e1c4f0cc7;p=openldap Rework DB_THREAD test --- diff --git a/build/openldap.m4 b/build/openldap.m4 index f3de824dfd..7b0acc8783 100644 --- a/build/openldap.m4 +++ b/build/openldap.m4 @@ -354,15 +354,21 @@ main() #ifdef DB_CDB_ALLDB rc = env->set_flags( env, DB_CDB_ALLDB, 1 ); - if( rc == 0 ) + + if( rc ) { + printf("BerkeleyDB: %s\n", db_strerror(rc) ); + return rc; + } #endif - { #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) - rc = env->open( env, NULL, flags, 0 ); + rc = env->open( env, NULL, flags, 0 ); #else - rc = env->open( env, NULL, NULL, flags, 0 ); + rc = env->open( env, NULL, NULL, flags, 0 ); #endif + + if ( rc == 0 ) { + rc = env->close( env, 0 ); } if( rc ) { @@ -370,12 +376,6 @@ main() return rc; } -#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; memset( &env, '\0', sizeof(env) ); diff --git a/configure b/configure index 011b4a7248..c315a36eb4 100755 --- a/configure +++ b/configure @@ -12921,15 +12921,21 @@ main() #ifdef DB_CDB_ALLDB rc = env->set_flags( env, DB_CDB_ALLDB, 1 ); - if( rc == 0 ) + + if( rc ) { + printf("BerkeleyDB: %s\n", db_strerror(rc) ); + return rc; + } #endif - { #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) - rc = env->open( env, NULL, flags, 0 ); + rc = env->open( env, NULL, flags, 0 ); #else - rc = env->open( env, NULL, NULL, flags, 0 ); + rc = env->open( env, NULL, NULL, flags, 0 ); #endif + + if ( rc == 0 ) { + rc = env->close( env, 0 ); } if( rc ) { @@ -12937,12 +12943,6 @@ main() return rc; } -#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; memset( &env, '\0', sizeof(env) );