(CHISE_Attribute_Table_open): Add code for BDB Ver. 4.1 or later.
authortomo <tomo>
Thu, 16 Oct 2003 03:30:07 +0000 (03:30 +0000)
committertomo <tomo>
Thu, 16 Oct 2003 03:30:07 +0000 (03:30 +0000)
chise.c

diff --git a/chise.c b/chise.c
index e76172b..c37410b 100644 (file)
--- a/chise.c
+++ b/chise.c
@@ -656,8 +656,14 @@ CHISE_Attribute_Table_open (const unsigned char *db_dir,
        *sp++ = c;
     }
   *sp = '\0';
+#if DB_VERSION_MAJOR < 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 1)
   status = dbase->open (dbase, db_file_name, NULL,
                        real_subtype, accessmask, modemask);
+#else /* DB_VERSION >= 4.1 */
+  status = dbase->open (dbase, NULL, db_file_name, NULL,
+                       real_subtype,
+                       accessmask /* | DB_AUTO_COMMIT */, modemask);
+#endif /* DB_VERSION < 4.1 */
   if (status)
     {
       dbase->close (dbase, 0);