#include <ac/string.h>
#include <ac/socket.h>
-#include "ldapconfig.h"
+#include "ldap_defaults.h"
#include "slap.h"
#include "back-bdb2.h"
/* Allocate an ID_BLOCK with room for nids ids */
ID_BLOCK *
-bdb2i_idl_alloc( int nids )
+bdb2i_idl_alloc( unsigned int nids )
{
ID_BLOCK *new;
/* Allocate an empty ALLIDS ID_BLOCK */
ID_BLOCK *
-bdb2i_idl_allids( Backend *be )
+bdb2i_idl_allids( BackendDB *be )
{
ID_BLOCK *idl;
/* Fetch an single ID_BLOCK from the cache */
static ID_BLOCK *
idl_fetch_one(
- Backend *be,
+ BackendDB *be,
struct dbcache *db,
Datum key
)
*/
ID_BLOCK *
bdb2i_idl_fetch(
- Backend *be,
+ BackendDB *be,
struct dbcache *db,
Datum key
)
}
free( (char *) tmp );
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_idl_fetch %lu ids (%lu max)\n",
+ Debug( LDAP_DEBUG_TRACE, "<= bdb2i_idl_fetch %ld ids (%ld max)\n",
ID_BLOCK_NIDS(idl), ID_BLOCK_NMAX(idl), 0 );
return( idl );
}
/* store a single block */
static int
idl_store(
- Backend *be,
+ BackendDB *be,
struct dbcache *db,
Datum key,
ID_BLOCK *idl
*/
static int
idl_change_first(
- Backend *be,
+ BackendDB *be,
struct dbcache *db,
Datum hkey, /* header block key */
ID_BLOCK *h, /* header block */
/* delete old key block */
if ( (rc = bdb2i_cache_delete( db, bkey )) != 0 ) {
Debug( LDAP_DEBUG_ANY,
- "ldbm_delete of (%s) returns %d\n", bkey.dptr, rc,
+ "bdb2i_db_delete of (%s) returns %d\n", bkey.dptr, rc,
0 );
return( rc );
}
int
bdb2i_idl_insert_key(
- Backend *be,
+ BackendDB *be,
struct dbcache *db,
Datum key,
ID id
case 0: /* id inserted */
if ( rc == 2 ) {
Debug( LDAP_DEBUG_ANY,
- "id %lu already in next block\n",
+ "id %ld already in next block\n",
id, 0, 0 );
}
free( kstr );
* 3 id not inserted, block must be split
*/
int
-bdb2i_idl_insert( ID_BLOCK **idl, ID id, int maxids )
+bdb2i_idl_insert( ID_BLOCK **idl, ID id, unsigned int maxids )
{
unsigned int i, j;
int
bdb2i_idl_delete_key (
- Backend *be,
+ BackendDB *be,
struct dbcache *db,
Datum key,
ID id
*/
ID_BLOCK *
bdb2i_idl_intersection(
- Backend *be,
+ BackendDB *be,
ID_BLOCK *a,
ID_BLOCK *b
)
*/
ID_BLOCK *
bdb2i_idl_union(
- Backend *be,
+ BackendDB *be,
ID_BLOCK *a,
ID_BLOCK *b
)
*/
ID_BLOCK *
bdb2i_idl_notin(
- Backend *be,
+ BackendDB *be,
ID_BLOCK *a,
ID_BLOCK *b
)