#include <ldap_cdefs.h>
+#include "external.h"
+
LDAP_BEGIN_DECL
/*
* cache.c
*/
-void cache_set_state LDAP_P(( struct cache *cache, Entry *e, int state ));
-void cache_return_entry_r LDAP_P(( struct cache *cache, Entry *e ));
-void cache_return_entry_w LDAP_P(( struct cache *cache, Entry *e ));
-int cache_add_entry_lock LDAP_P(( struct cache *cache, Entry *e, int state ));
+int cache_add_entry_rw LDAP_P(( struct cache *cache, Entry *e, int rw ));
+int cache_update_entry LDAP_P(( struct cache *cache, Entry *e ));
+void cache_return_entry_rw LDAP_P(( struct cache *cache, Entry *e, int rw ));
+#define cache_return_entry_r(c, e) cache_return_entry_rw((c), (e), 0)
+#define cache_return_entry_w(c, e) cache_return_entry_rw((c), (e), 1)
+
ID cache_find_entry_dn2id LDAP_P(( Backend *be, struct cache *cache, char *dn ));
Entry * cache_find_entry_id LDAP_P(( struct cache *cache, ID id, int rw ));
int cache_delete_entry LDAP_P(( struct cache *cache, Entry *e ));
int dn2id_add LDAP_P(( Backend *be, char *dn, ID id ));
ID dn2id LDAP_P(( Backend *be, char *dn ));
int dn2id_delete LDAP_P(( Backend *be, char *dn ));
-Entry * dn2entry_r LDAP_P(( Backend *be, char *dn, char **matched ));
-Entry * dn2entry_w LDAP_P(( Backend *be, char *dn, char **matched ));
+
+Entry * dn2entry_rw LDAP_P(( Backend *be, char *dn, char **matched, int rw ));
+#define dn2entry_r(be, dn, m) dn2entry_rw((be), (dn), (m), 0)
+#define dn2entry_w(be, dn, m) dn2entry_rw((be), (dn), (m), 1)
/*
* filterindex.c
int id2entry_add LDAP_P(( Backend *be, Entry *e ));
int id2entry_delete LDAP_P(( Backend *be, Entry *e ));
-Entry * id2entry LDAP_P(( Backend *be, ID id, int rw ));
-Entry * id2entry_r LDAP_P(( Backend *be, ID id ));
-Entry * id2entry_w LDAP_P(( Backend *be, ID id ));
+
+Entry * id2entry_rw LDAP_P(( Backend *be, ID id, int rw ));
+#define id2entry_r(be, id) id2entry_rw((be), (id), 0)
+#define id2entry_w(be, id) id2entry_rw((be), (id), 1)
/*
* idl.c
/* krbv4_ldap_auth LDAP_P(( Backend *be, struct berval *cred, AUTH_DAT *ad )); */
#endif
-/*
- * startup.c
- */
-
-void ldbm_back_startup LDAP_P(( Backend *be ));
-void ldbm_back_shutdown LDAP_P(( Backend *be ));
-void ldbm_db_errcall LDAP_P(( char *prefix, char *message ));
-
/*
* nextid.c
*/