Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
1140:db9bfcf5e054 | 1141:0dade3314f4f |
---|---|
57 #endif /* !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1) */ | 57 #endif /* !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1) */ |
58 #include DB_H_FILE /* Berkeley db's header file */ | 58 #include DB_H_FILE /* Berkeley db's header file */ |
59 #ifndef DB_VERSION_MAJOR | 59 #ifndef DB_VERSION_MAJOR |
60 # define DB_VERSION_MAJOR 1 | 60 # define DB_VERSION_MAJOR 1 |
61 #endif /* DB_VERSION_MAJOR */ | 61 #endif /* DB_VERSION_MAJOR */ |
62 #ifndef DB_VERSION_MINOR | |
63 # define DB_VERSION_MINOR 0 | |
64 #endif /* DB_VERSION_MINOR */ | |
62 Lisp_Object Qberkeley_db; | 65 Lisp_Object Qberkeley_db; |
63 Lisp_Object Qhash, Qbtree, Qrecno, Qunknown; | 66 Lisp_Object Qhash, Qbtree, Qrecno, Qunknown; |
64 #if DB_VERSION_MAJOR > 2 | 67 #if DB_VERSION_MAJOR > 2 |
65 Lisp_Object Qqueue; | 68 Lisp_Object Qqueue; |
66 #endif | 69 #endif |
713 return Qnil; | 716 return Qnil; |
714 #else | 717 #else |
715 status = db_create (&dbase, NULL, 0); | 718 status = db_create (&dbase, NULL, 0); |
716 if (status) | 719 if (status) |
717 return Qnil; | 720 return Qnil; |
721 #if DB_VERSION_MAJOR < 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 1) | |
718 status = dbase->open (dbase, filename, NULL, | 722 status = dbase->open (dbase, filename, NULL, |
719 real_subtype, accessmask, modemask); | 723 real_subtype, accessmask, modemask); |
724 #else /* DB_VERSION >= 4.1 */ | |
725 status = dbase->open (dbase, NULL, filename, NULL, real_subtype, | |
726 accessmask | DB_AUTO_COMMIT, modemask); | |
727 #endif /* DB_VERSION < 4.1 */ | |
720 if (status) | 728 if (status) |
721 { | 729 { |
722 dbase->close (dbase, 0); | 730 dbase->close (dbase, 0); |
723 return Qnil; | 731 return Qnil; |
724 } | 732 } |