/* $OpenLDAP$ */
/*
- * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
+ * Copyright 1998-2003 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <ldap_cdefs.h>
+/* dummy DB_ENV for non Berkeley DB */
+#if !defined( LDBM_USE_DBBTREE ) && !defined( LDBM_USE_DBHASH )
+# define DB_ENV void
+#endif
+
#if defined( LDBM_USE_DBBTREE ) || defined( LDBM_USE_DBHASH )
/*****************************************************************
# ifndef DEFAULT_DB_PAGE_SIZE
# define DEFAULT_DB_PAGE_SIZE 4096
# endif
+#else
+# define DB_ENV void
#endif
typedef Datum LDBMCursor;
typedef GDBM_FILE LDBM;
-extern gdbm_error gdbm_errno;
-
LDAP_END_DECL
/* for ldbm_open */
typedef MDBM *LDBM;
LDAP_END_DECL
-
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
LDAP_LDBM_F (int) ldbm_initialize( const char * );
LDAP_LDBM_F (int) ldbm_shutdown( void );
+LDAP_LDBM_F (DB_ENV*) ldbm_initialize_env(const char *, int dbcachesize, int *envdirok);
+LDAP_LDBM_F (void) ldbm_shutdown_env(DB_ENV *);
+
LDAP_LDBM_F (int) ldbm_errno( LDBM ldbm );
-LDAP_LDBM_F (LDBM) ldbm_open( char *name, int rw, int mode, int dbcachesize );
+LDAP_LDBM_F (LDBM) ldbm_open( DB_ENV *env, char *name, int rw, int mode, int dbcachesize );
LDAP_LDBM_F (void) ldbm_close( LDBM ldbm );
LDAP_LDBM_F (void) ldbm_sync( LDBM ldbm );
LDAP_LDBM_F (void) ldbm_datum_free( LDBM ldbm, Datum data );