--- DBI.cpp~ 2003-05-18 08:59:11.000000000 +0300 +++ DBI.cpp 2003-07-24 16:39:02.000000000 +0300 @@ -383,7 +383,11 @@ out << "starting transaction for environment \"" << _name << "\""; } +#if DB_VERSION_MAJOR >= 4 + checkBerkeleyDBReturn(dbEnv->txn_begin(dbEnv, 0, &_tid, 0), _errorPrefix, "txn_begin"); +#else checkBerkeleyDBReturn(txn_begin(dbEnv, 0, &_tid, 0), _errorPrefix, "txn_begin"); +#endif } Freeze::DBTransactionI::~DBTransactionI() @@ -415,7 +419,11 @@ out << "committing transaction for environment \"" << _name << "\""; } +#if DB_VERSION_MAJOR >= 4 + checkBerkeleyDBReturn(_tid->commit(_tid, 0), _errorPrefix, "txn_commit"); +#else checkBerkeleyDBReturn(txn_commit(_tid, 0), _errorPrefix, "txn_commit"); +#endif _tid = 0; } @@ -440,7 +448,11 @@ out << "aborting transaction for environment \"" << _name << "\" due to deadlock"; } +#if DB_VERSION_MAJOR >= 4 + checkBerkeleyDBReturn(_tid->abort(_tid), _errorPrefix, "txn_abort"); +#else checkBerkeleyDBReturn(txn_abort(_tid), _errorPrefix, "txn_abort"); +#endif _tid = 0; }