]> git.sur5r.net Git - openldap/blobdiff - include/ldbm.h
Added dnPretty2/dnNormalize2 using preallocated destination berval
[openldap] / include / ldbm.h
index b306c0e9ee92f939f7c8c460794d55c5228b06a8..1592c23da5c60d69361e1481ce6d801a85b13b1c 100644 (file)
 
 #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 )
 
 /*****************************************************************
@@ -49,6 +54,8 @@
 #      ifndef DEFAULT_DB_PAGE_SIZE
 #              define DEFAULT_DB_PAGE_SIZE 4096
 #      endif
+#else
+#  define DB_ENV void
 #endif
 
 
@@ -120,8 +127,6 @@ typedef datum               Datum;
 typedef Datum LDBMCursor;
 typedef GDBM_FILE      LDBM;
 
-extern gdbm_error      gdbm_errno;
-
 LDAP_END_DECL
 
 /* for ldbm_open */
@@ -172,7 +177,7 @@ typedef int LDBMCursor;
 typedef MDBM           *LDBM;
 
 LDAP_END_DECL
-    
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -240,8 +245,11 @@ LDAP_BEGIN_DECL
 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 );