mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-28 01:29:18 -05:00
Wrap db2 mutex with -DHAVE_BERKELEY_DB2 (should be hidden in -lldbm) ITS#35
Unwrap ldbm_datum_init()
This commit is contained in:
parent
0f76c52448
commit
b815f61e0d
5 changed files with 6 additions and 12 deletions
|
|
@ -23,12 +23,7 @@ id2children_add(
|
|||
IDList *idl;
|
||||
char buf[20];
|
||||
|
||||
#ifdef HAVE_BERKELEY_DB2
|
||||
Datum data;
|
||||
|
||||
ldbm_datum_init( key );
|
||||
ldbm_datum_init( data );
|
||||
#endif
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "=> id2children_add( %lu, %lu )\n",
|
||||
p ? p->e_id : 0, e->e_id, 0 );
|
||||
|
|
|
|||
|
|
@ -56,12 +56,7 @@ idl_fetch_one(
|
|||
Datum data;
|
||||
IDList *idl;
|
||||
|
||||
#ifdef HAVE_BERKELEY_DB2
|
||||
Datum k2;
|
||||
|
||||
ldbm_datum_init( data );
|
||||
ldbm_datum_init( k2 );
|
||||
#endif
|
||||
|
||||
/* Debug( LDAP_DEBUG_TRACE, "=> idl_fetch_one\n", 0, 0, 0 ); */
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ ldbm_back_init(
|
|||
char *argv[ 4 ];
|
||||
int i;
|
||||
|
||||
#ifdef HAVE_BERKELEY_DB2
|
||||
extern pthread_mutex_t dbEnvInit_mutex;
|
||||
#endif
|
||||
|
||||
/* allocate backend-specific stuff */
|
||||
li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) );
|
||||
|
|
@ -77,7 +79,9 @@ ldbm_back_init(
|
|||
pthread_cond_init( &li->li_dbcache[i].dbc_cv,
|
||||
pthread_condattr_default );
|
||||
}
|
||||
#ifdef HAVE_BERKELEY_DB2
|
||||
pthread_mutex_init( &dbEnvInit_mutex, pthread_mutexattr_default );
|
||||
#endif
|
||||
|
||||
be->be_private = li;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ main( int argc, char **argv )
|
|||
|
||||
#ifdef HAVE_BERKELEY_DB2
|
||||
DBC *cursorp;
|
||||
#endif
|
||||
|
||||
ldbm_datum_init( key );
|
||||
ldbm_datum_init( last );
|
||||
ldbm_datum_init( data );
|
||||
#endif
|
||||
|
||||
if ( argc < 2 || argc > 3 || ( argc == 3 && strcmp( argv[1], "-n" )
|
||||
!= 0 )) {
|
||||
|
|
|
|||
|
|
@ -70,12 +70,12 @@ main( int argc, char **argv )
|
|||
|
||||
#ifdef HAVE_BERKELEY_DB2
|
||||
DBC *cursorp;
|
||||
#endif
|
||||
|
||||
ldbm_datum_init( savekey );
|
||||
ldbm_datum_init( key );
|
||||
ldbm_datum_init( data );
|
||||
ldbm_datum_init( last );
|
||||
#endif
|
||||
|
||||
tailorfile = SLAPD_DEFAULT_CONFIGFILE;
|
||||
while ( (i = getopt( argc, argv, "d:f:" )) != EOF ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue