]> git.sur5r.net Git - openldap/commitdiff
MDBM support added.
authorJuan Gomez <gomez@openldap.org>
Tue, 30 Mar 1999 04:39:41 +0000 (04:39 +0000)
committerJuan Gomez <gomez@openldap.org>
Tue, 30 Mar 1999 04:39:41 +0000 (04:39 +0000)
include/ldbm.h

index ffe8804d6c40487594db0c45a898da8c5f6c12bd..00582873e46464b5554f93860a01f157fd6809b5 100644 (file)
@@ -161,6 +161,41 @@ LDAP_END_DECL
 #define LDBM_REPLACE   GDBM_REPLACE
 #define LDBM_SYNC      0x80000000
 
+#elif defined( HAVE_MDBM )
+
+/*****************************************************************
+ *                                                               *
+ * use mdbm if possible                                          *
+ *                                                               *
+ *****************************************************************/
+
+#include <mdbm.h>
+
+LDAP_BEGIN_DECL
+
+typedef datum          Datum;
+typedef MDBM           *LDBM;
+
+LDAP_END_DECL
+    
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/* for ldbm_open */
+#define LDBM_READER    O_RDONLY
+#define LDBM_WRITER    O_RDWR
+#define LDBM_WRCREAT   (O_RDWR|O_CREAT)
+#define LDBM_NEWDB     (O_RDWR|O_TRUNC|O_CREAT)
+#define LDBM_FAST      0
+
+#define LDBM_SUFFIX    ".mdbm"
+
+/* for ldbm_insert */
+#define LDBM_INSERT    MDBM_INSERT
+#define LDBM_REPLACE   MDBM_REPLACE
+#define LDBM_SYNC      0x80000000
+
 
 #elif defined( HAVE_NDBM )