Skip to content
Snippets Groups Projects
Commit e6a12272 authored by Howard Chu's avatar Howard Chu
Browse files

BDB 4.3 compatibility

parent 84ce5490
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,11 @@
#include "slap.h"
#include "back-bdb.h"
#if DB_VERSION_FULL < 0x04030000
void bdb_errcall( const char *pfx, char * msg )
#else
void bdb_errcall( DB_ENV *env, const char *pfx, const char * msg )
#endif
{
#ifdef HAVE_EBCDIC
if ( msg[0] > 0x7f )
......
......@@ -724,14 +724,9 @@ bdb_idl_insert_key(
}
}
if ( id < lo || id > hi ) {
/* Delete the current lo/hi */
rc = cursor->c_del( cursor, 0 );
if ( rc != 0 ) {
err = "c_del";
goto fail;
}
/* Replace the current lo/hi */
data.data = &id;
rc = cursor->c_put( cursor, key, &data, DB_KEYFIRST );
rc = cursor->c_put( cursor, key, &data, DB_CURRENT );
if ( rc != 0 ) {
err = "c_put lo/hi";
goto fail;
......
......@@ -139,7 +139,11 @@ int bdb_fix_dn( Entry *e, int checkit );
*/
#define bdb_errcall BDB_SYMBOL(errcall)
#if DB_VERSION_FULL < 0x04030000
void bdb_errcall( const char *pfx, char * msg );
#else
void bdb_errcall( DB_ENV *env, const char *pfx, const char * msg );
#endif
#ifdef HAVE_EBCDIC
#define ebcdic_dberror BDB_SYMBOL(ebcdic_dberror)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment