__atoe(n2);
name = n2;
#endif
+#if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR > 0 && DB_VERSION_PATCH >= 17
+ err = ret->open( ret, NULL, name, NULL, DB_TYPE, rw, mode);
+#else
err = ret->open( ret, name, NULL, DB_TYPE, rw, mode);
+#endif
if ( err != 0 ) {
int tmp = errno;
int boi_err;
};
+#define DB_OPEN(db, file, name, type, flags, mode) \
+ (db)->open(db, file, name, type, flags, mode)
+
#if DB_VERSION_MAJOR < 4
#define LOCK_DETECT(env,f,t,a) lock_detect(env, f, t, a)
#define LOCK_GET(env,i,f,o,m,l) lock_get(env, i, f, o, m, l)
#define TXN_ID(txn) (txn)->id(txn)
#define LOCK_ID(env, locker) (env)->lock_id(env, locker)
#define LOCK_ID_FREE(env, locker) (env)->lock_id_free(env, locker)
+
+#if DB_VERSION_MINOR > 1 || DB_VERSION_PATCH >= 17
+#undef DB_OPEN
+#define DB_OPEN(db, file, name, type, flags, mode) \
+ (db)->open(db, NULL, file, name, type, (flags)|DB_AUTO_COMMIT, mode)
+#endif
+
#endif
LDAP_END_DECL
file = ch_malloc( strlen( name ) + sizeof(BDB_SUFFIX) );
sprintf( file, "%s" BDB_SUFFIX, name );
- rc = db->bdi_db->open( db->bdi_db,
+ rc = DB_OPEN( db->bdi_db,
file, name,
DB_HASH, bdb->bi_db_opflags | DB_CREATE | DB_THREAD,
bdb->bi_dbenv_mode );