Rework DB_THREAD test

This commit is contained in:
Kurt Zeilenga 2001-06-07 17:23:43 +00:00
parent af79d6e354
commit 5d1608ac1b
2 changed files with 20 additions and 20 deletions

View File

@ -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
View File

@ -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) );