mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-03 02:41:24 +08:00
Rework DB_THREAD test
This commit is contained in:
parent
af79d6e354
commit
5d1608ac1b
@ -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 );
|
||||
#else
|
||||
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) );
|
||||
|
16
configure
vendored
16
configure
vendored
@ -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 );
|
||||
#else
|
||||
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) );
|
||||
|
Loading…
Reference in New Issue
Block a user