#define TXN_ID(txn) (txn)->locker
#endif
+/* env->log_printf appeared in 4.4 */
+#if DB_VERSION_FULL >= 0x04040000
+#define LOG_PRINTF(env,txn,fmt,...) (env)->log_printf((env),(txn),(fmt),__VA_ARGS__)
+#else
+extern int __db_logmsg(const DB_ENV *env, DB_TXN *txn, const char *op, u_int32_t flags,
+ const char *fmt,...);
+#define LOG_PRINTF(env,txn,fmt,...) __db_logmsg((env),(txn),"DIAGNOSTIC",0,(fmt),__VA_ARGS__)
+#endif
+
#endif
#ifndef DB_BUFFER_SMALL
bdb_cache_entryinfo_unlock( eip );
#if defined(LDAP_DEBUG) && defined(LDAP_DEVEL)
- bdb->bi_dbenv->log_printf( bdb->bi_dbenv, NULL, "slapd Reading %s",
+ LOG_PRINTF( bdb->bi_dbenv, NULL, "slapd Reading %s",
ei.bei_nrdn.bv_val );
#endif
}
#if defined(LDAP_DEBUG) && defined(LDAP_DEVEL)
- bdb->bi_dbenv->log_printf( bdb->bi_dbenv, NULL, "slapd Read got %s(%d)",
+ LOG_PRINTF( bdb->bi_dbenv, NULL, "slapd Read got %s(%d)",
ei.bei_nrdn.bv_val, ei.bei_id );
#endif
}
#if defined(LDAP_DEBUG) && defined(LDAP_DEVEL)
- bdb->bi_dbenv->log_printf( bdb->bi_dbenv, lt2, "slapd Starting delete %s(%d)",
+ LOG_PRINTF( bdb->bi_dbenv, lt2, "slapd Starting delete %s(%d)",
e->e_nname.bv_val, e->e_id );
#endif
}
#if defined(LDAP_DEBUG) && defined(LDAP_DEVEL)
- bdb->bi_dbenv->log_printf( bdb->bi_dbenv, lt2, "slapd Commit1 delete %s(%d)",
+ LOG_PRINTF( bdb->bi_dbenv, lt2, "slapd Commit1 delete %s(%d)",
e->e_nname.bv_val, e->e_id );
#endif
} else {
#if defined(LDAP_DEBUG) && defined(LDAP_DEVEL)
- bdb->bi_dbenv->log_printf( bdb->bi_dbenv, ltid, "slapd Cache delete %s(%d)",
+ LOG_PRINTF( bdb->bi_dbenv, ltid, "slapd Cache delete %s(%d)",
e->e_nname.bv_val, e->e_id );
#endif
op->o_private = NULL;
#if defined(LDAP_DEBUG) && defined(LDAP_DEVEL)
- bdb->bi_dbenv->log_printf( bdb->bi_dbenv, NULL, "slapd Committed delete %s(%d)",
+ LOG_PRINTF( bdb->bi_dbenv, NULL, "slapd Committed delete %s(%d)",
e->e_nname.bv_val, e->e_id );
#endif