34 #if defined(LIBC_SCCS) && !defined(lint) 35 static char sccsid[] =
"@(#)db.c 8.4 (Berkeley) 2/21/94";
38 #include <sys/types.h> 45 #include "../include/db.h" 55 #define DB_FLAGS (DB_LOCK | DB_SHMEM | DB_TXN) 56 #define USE_OPEN_FLAGS \ 57 (O_CREAT | O_EXCL | O_EXLOCK | O_NONBLOCK | O_RDONLY | \ 58 O_RDWR | O_SHLOCK | O_TRUNC) 67 mode, openinfo, flags & DB_FLAGS));
69 return (
__rec_open(fname, flags & USE_OPEN_FLAGS,
70 mode, openinfo, flags & DB_FLAGS));
93 dbp->del = (int (*)
__P((
const struct __db *,
94 const DBT *, u_int))) __dberr;
95 dbp->get = (int (*)
__P((
const struct __db *,
96 const DBT *,
DBT *, u_int))) __dberr;
97 dbp->put = (int (*)
__P((
const struct __db *,
98 DBT *,
const DBT *, u_int))) __dberr;
99 dbp->seq = (int (*)
__P((
const struct __db *,
100 DBT *,
DBT *, u_int))) __dberr;
101 dbp->sync = (int (*)
__P((
const struct __db *, u_int))) __dberr;
102 dbp->fd = (int (*)
__P((
const struct __db *))) __dberr;
DB * __hash_open(char *file, int flags, int mode, const HASHINFO *info, int dflags) const
static int __dberr __P((void))
DB * __bt_open(char *fname, int flags, int mode, const BTREEINFO *openinfo, int dflags) const
DB * __rec_open(char *fname, int flags, int mode, const RECNOINFO *openinfo, int dflags) const
DB * dbopen(char *fname, int flags, int mode, DBTYPE type, const void *openinfo) const