39 #include <sys/types.h> 43 #ifdef __DBINTERFACE_PRIVATE 55 #ifndef __BIT_TYPES_DEFINED__ 56 #define __BIT_TYPES_DEFINED__ 57 #if (!defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__)) 64 #ifdef WE_DONT_NEED_QUADS 65 typedef long long int64_t;
66 typedef unsigned long long u_int64_t;
77 #define MAX_PAGE_NUMBER 0xffffffff 79 #define MAX_PAGE_OFFSET 65535 81 #define MAX_REC_NUMBER 0xffffffff 98 #define R_NOOVERWRITE 8 100 #define R_SETCURSOR 10 101 #define R_RECNOSYNC 11 119 #define DB_LOCK 0x20000000 120 #define DB_SHMEM 0x40000000 121 #define DB_TXN 0x80000000 123 #define DB_LOCK 0x2000 124 #define DB_SHMEM 0x4000 125 #define DB_TXN 0x8000 131 int (*close)
__P((
struct __db *));
132 int (*del)
__P((
const struct __db *,
const DBT *, u_int));
133 int (*
get)
__P((const struct
__db *, const
DBT *, DBT *, u_int));
134 int (*put)
__P((const struct __db *, DBT *, const DBT *, u_int));
135 int (*
seq)
__P((const struct __db *, DBT *, DBT *, u_int));
136 int (*sync)
__P((const struct __db *, u_int));
138 int (*fd)
__P((const struct __db *));
141 #define BTREEMAGIC 0x053162 142 #define BTREEVERSION 3 153 __P((
const DBT *,
const DBT *));
155 __P((
const DBT *,
const DBT *));
159 #define HASHMAGIC 0x061561 160 #define HASHVERSION 2 169 (*hash)
__P((
const void *,
size_t));
175 #define R_FIXEDLEN 0x01 177 #define R_SNAPSHOT 0x04 187 #ifdef __DBINTERFACE_PRIVATE 194 #define M_32_SWAP(a) { \ 195 u_int32_t _tmp = a; \ 196 ((char *)&a)[0] = ((char *)&_tmp)[3]; \ 197 ((char *)&a)[1] = ((char *)&_tmp)[2]; \ 198 ((char *)&a)[2] = ((char *)&_tmp)[1]; \ 199 ((char *)&a)[3] = ((char *)&_tmp)[0]; \ 201 #define P_32_SWAP(a) { \ 202 u_int32_t _tmp = *(u_int32_t *)a; \ 203 ((char *)a)[0] = ((char *)&_tmp)[3]; \ 204 ((char *)a)[1] = ((char *)&_tmp)[2]; \ 205 ((char *)a)[2] = ((char *)&_tmp)[1]; \ 206 ((char *)a)[3] = ((char *)&_tmp)[0]; \ 208 #define P_32_COPY(a, b) { \ 209 ((char *)&(b))[0] = ((char *)&(a))[3]; \ 210 ((char *)&(b))[1] = ((char *)&(a))[2]; \ 211 ((char *)&(b))[2] = ((char *)&(a))[1]; \ 212 ((char *)&(b))[3] = ((char *)&(a))[0]; \ 221 #define M_16_SWAP(a) { \ 222 u_int16_t _tmp = a; \ 223 ((char *)&a)[0] = ((char *)&_tmp)[1]; \ 224 ((char *)&a)[1] = ((char *)&_tmp)[0]; \ 226 #define P_16_SWAP(a) { \ 227 u_int16_t _tmp = *(u_int16_t *)a; \ 228 ((char *)a)[0] = ((char *)&_tmp)[1]; \ 229 ((char *)a)[1] = ((char *)&_tmp)[0]; \ 231 #define P_16_COPY(a, b) { \ 232 ((char *)&(b))[0] = ((char *)&(a))[1]; \ 233 ((char *)&(b))[1] = ((char *)&(a))[0]; \ 238 DB *__dbopen
__P((
const char *,
int,
int,
DBTYPE,
const void *));
241 #ifdef __DBINTERFACE_PRIVATE
DB * __hash_open(char *file, int flags, int mode, const HASHINFO *info, int dflags) const
DB * __bt_open(char *fname, int flags, int mode, const BTREEINFO *openinfo, int dflags) const
__BEGIN_DECLS DB *__dbopen __P((const char *, int, int, DBTYPE, const void *))
DB * __rec_open(char *fname, int flags, int mode, const RECNOINFO *openinfo, int dflags) const
static volatile unsigned int seq
static int compare(const char *text, const char *template)
DB * dbopen(char *fname, int flags, int mode, DBTYPE type, const void *openinfo) const
static char prefix[MAX_PREFIX]