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
65typedef long long int64_t;
66typedef 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
136 int (*sync)
__P((
const struct __db *, u_int));
141#define BTREEMAGIC 0x053162
142#define BTREEVERSION 3
159#define HASHMAGIC 0x061561
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]; \
241#ifdef __DBINTERFACE_PRIVATE
static int compare(const char *text, const char *template)
static volatile unsigned int seq
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 * __hash_open(char *file, int flags, int mode, const HASHINFO *info, int dflags) const
static char prefix[MAX_PREFIX]
DB * __rec_open(char *fname, int flags, int mode, const RECNOINFO *openinfo, int dflags) const
u_int32_t hash __P((const void *, size_t))
int sync __P((const struct __db *, u_int))
int fd __P((const struct __db *))
int get __P((const struct __db *, const DBT *, DBT *, u_int))
int put __P((const struct __db *, DBT *, const DBT *, u_int))
int seq __P((const struct __db *, DBT *, DBT *, u_int))
int close __P((struct __db *))
int del __P((const struct __db *, const DBT *, u_int))
DB * dbopen(char *fname, int flags, int mode, DBTYPE type, const void *openinfo) const