rc = db->bdi_db->set_h_hash( db->bdi_db, bdb_db_hash );
#endif
rc = db->bdi_db->set_flags( db->bdi_db, DB_DUP | DB_DUPSORT );
-#if 0
- rc = db->bdi_db->set_dup_compare( db->bdi_db, bdb_bt_compare );
-#endif
file = ch_malloc( strlen( name ) + sizeof(BDB_SUFFIX) );
sprintf( file, "%s" BDB_SUFFIX, name );
return 0;
}
-#if 0
-int
-bdb_bt_compare(
- DB *db,
- const DBT *usrkey,
- const DBT *curkey )
-{
- unsigned char *u, *c;
- int i, x;
-
- u = usrkey->data;
- c = curkey->data;
-
-#ifdef WORDS_BIGENDIAN
- for( i = 0; i < (int)sizeof(ID); i++)
-#else
- for( i = sizeof(ID)-1; i >= 0; i--)
-#endif
- {
- x = u[i] - c[i];
- if( x ) return x;
- }
-
- return 0;
-}
-#endif
-
static void *
bdb_checkpoint( void *ctx, void *arg )
{
}
if( i == BDB_ID2ENTRY ) {
-#if 0
- rc = db->bdi_db->set_bt_compare( db->bdi_db,
- bdb_bt_compare );
-#endif
rc = db->bdi_db->set_pagesize( db->bdi_db,
BDB_ID2ENTRY_PAGESIZE );
if ( slapMode & SLAP_TOOL_READMAIN ) {
rc = db->bdi_db->set_flags( db->bdi_db,
DB_DUP | DB_DUPSORT );
#ifndef BDB_HIER
-#if 0
- rc = db->bdi_db->set_dup_compare( db->bdi_db,
- bdb_bt_compare );
-#endif
if ( slapMode & SLAP_TOOL_READONLY ) {
flags |= DB_RDONLY;
} else {
flags |= DB_CREATE;
}
#else
-#if 0
- rc = db->bdi_db->set_dup_compare( db->bdi_db,
- bdb_dup_compare );
- rc = db->bdi_db->set_bt_compare( db->bdi_db,
- bdb_bt_compare );
-#endif
if ( slapMode & (SLAP_TOOL_READONLY|SLAP_TOOL_READMAIN) ) {
flags |= DB_RDONLY;
} else {
#ifdef BDB_HIER
#define bdb_dn2id_parent BDB_SYMBOL(dn2id_parent)
-#define bdb_dup_compare BDB_SYMBOL(dup_compare)
#define bdb_fix_dn BDB_SYMBOL(fix_dn)
int bdb_dn2id_parent(
EntryInfo *ei,
ID *idp );
-int bdb_dup_compare(
- DB *db,
- const DBT *usrkey,
- const DBT *curkey );
-
int bdb_fix_dn( Entry *e, int checkit );
#endif
ID bdb_idl_next( ID *ids, ID *cursor );
-#if 0
-#define bdb_bt_compare BDB_SYMBOL(bt_compare)
-
-int bdb_bt_compare(
- DB *db,
- const DBT *a,
- const DBT *b );
-#endif
-
/*
* index.c