From 3f462f318fd2f602fddb1a95e5d652e67aafa49e Mon Sep 17 00:00:00 2001 From: jbj Date: Mon, 15 Oct 2001 04:22:09 +0000 Subject: - upgrade to db-4.0.7. CVS patchset: 5112 CVS date: 2001/10/15 04:22:09 --- rpmdb/db3.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'rpmdb/db3.c') diff --git a/rpmdb/db3.c b/rpmdb/db3.c index af82c86e6..d31faa496 100644 --- a/rpmdb/db3.c +++ b/rpmdb/db3.c @@ -122,7 +122,7 @@ static int db_fini(dbiIndex dbi, const char * dbhome, xx = db_env_create(&dbenv, 0); /*@=moduncon@*/ xx = cvtdberr(dbi, "db_env_create", rc, _debug); -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0 +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0) || (DB_VERSION_MAJOR == 4) xx = dbenv->remove(dbenv, dbhome, 0); #else xx = dbenv->remove(dbenv, dbhome, NULL, 0); @@ -218,7 +218,7 @@ static int db_init(dbiIndex dbi, const char * dbhome, /* dbenv->set_tx_max(???) */ /* dbenv->set_tx_recover(???) */ if (dbi->dbi_no_fsync) { -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0 +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0) || (DB_VERSION_MAJOR == 4) xx = db_env_set_func_fsync(db3_fsync_disable); #else xx = dbenv->set_func_fsync(dbenv, db3_fsync_disable); @@ -227,7 +227,7 @@ static int db_init(dbiIndex dbi, const char * dbhome, } /* XXX 3.3.4 change. */ -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3) || (DB_VERSION_MAJOR == 4) if ((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host) { xx = dbenv->set_rpc_server(dbenv, NULL, dbi->dbi_host, dbi->dbi_cl_timeout, dbi->dbi_sv_timeout, 0); @@ -258,7 +258,7 @@ static int db_init(dbiIndex dbi, const char * dbhome, } } -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0 +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0) || (DB_VERSION_MAJOR == 4) rc = dbenv->open(dbenv, dbhome, eflags, dbi->dbi_perms); #else rc = dbenv->open(dbenv, dbhome, NULL, eflags, dbi->dbi_perms); @@ -577,7 +577,8 @@ static int db3byteswapped(dbiIndex dbi) /*@*/ int rc = 0; if (db != NULL) { -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 && DB_VERSION_PATCH == 11 +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 && DB_VERSION_PATCH == 11) \ + || (DB_VERSION_MAJOR == 4) int isswapped = 0; rc = db->get_byteswapped(db, &isswapped); if (rc == 0) @@ -605,7 +606,7 @@ static int db3stat(dbiIndex dbi, unsigned int flags) flags = 0; dbi->dbi_stats = _free(dbi->dbi_stats); /* XXX 3.3.4 change. */ -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3) || (DB_VERSION_MAJOR == 4) rc = db->stat(db, &dbi->dbi_stats, flags); #else rc = db->stat(db, &dbi->dbi_stats, NULL, flags); @@ -954,7 +955,7 @@ static int db3open(/*@keep@*/ rpmdb rpmdb, int rpmtag, dbiIndex * dbip) rc = cvtdberr(dbi, "db->set_pagesize", rc, _debug); } /* XXX 3.3.4 change. */ -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3) || (DB_VERSION_MAJOR == 4) if (rc == 0 && rpmdb->db_malloc && rpmdb->db_realloc && rpmdb->db_free) { @@ -988,7 +989,7 @@ static int db3open(/*@keep@*/ rpmdb rpmdb, int rpmtag, dbiIndex * dbip) if (rc) break; } /* XXX db-3.2.9 has added a DB arg to the call. */ -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2 +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2) || (DB_VERSION_MAJOR == 4) if (dbi->dbi_h_hash_fcn) { rc = db->set_h_hash(db, dbi->dbi_h_hash_fcn); rc = cvtdberr(dbi, "db->set_h_hash", rc, _debug); @@ -1013,7 +1014,7 @@ static int db3open(/*@keep@*/ rpmdb rpmdb, int rpmtag, dbiIndex * dbip) if (rc) break; } /* XXX db-3.2.9 has added a DB arg to the call. */ -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2 +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2) || (DB_VERSION_MAJOR == 4) if (dbi->dbi_bt_compare_fcn) { rc = db->set_bt_compare(db, dbi->dbi_bt_compare_fcn); rc = cvtdberr(dbi, "db->set_bt_compare", rc, _debug); @@ -1084,7 +1085,8 @@ static int db3open(/*@keep@*/ rpmdb rpmdb, int rpmtag, dbiIndex * dbip) dbi->dbi_type, oflags, dbi->dbi_perms); if (rc == 0 && dbi->dbi_type == DB_UNKNOWN) { -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 && DB_VERSION_PATCH == 11 +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 && DB_VERSION_PATCH == 11) \ + || (DB_VERSION_MAJOR == 4) DBTYPE dbi_type = DB_UNKNOWN; xx = db->get_type(db, &dbi_type); if (xx == 0) -- cgit v1.2.3