Mercurial > hg > xemacs-beta
diff src/database.c @ 1141:0dade3314f4f
[xemacs-hg @ 2002-12-04 13:54:31 by stephent]
BerkDB 4 <871y4xnb90.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Wed, 04 Dec 2002 13:54:45 +0000 |
parents | c925bacdda60 |
children | e22b0213b713 |
line wrap: on
line diff
--- a/src/database.c Tue Dec 03 22:53:38 2002 +0000 +++ b/src/database.c Wed Dec 04 13:54:45 2002 +0000 @@ -59,6 +59,9 @@ #ifndef DB_VERSION_MAJOR # define DB_VERSION_MAJOR 1 #endif /* DB_VERSION_MAJOR */ +#ifndef DB_VERSION_MINOR +# define DB_VERSION_MINOR 0 +#endif /* DB_VERSION_MINOR */ Lisp_Object Qberkeley_db; Lisp_Object Qhash, Qbtree, Qrecno, Qunknown; #if DB_VERSION_MAJOR > 2 @@ -715,8 +718,13 @@ status = db_create (&dbase, NULL, 0); if (status) return Qnil; +#if DB_VERSION_MAJOR < 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 1) status = dbase->open (dbase, filename, NULL, real_subtype, accessmask, modemask); +#else /* DB_VERSION >= 4.1 */ + status = dbase->open (dbase, NULL, filename, NULL, real_subtype, + accessmask | DB_AUTO_COMMIT, modemask); +#endif /* DB_VERSION < 4.1 */ if (status) { dbase->close (dbase, 0);