Ignore:
Timestamp:
Jan 11, 2004, 9:04:19 PM (22 years ago)
Author:
bird
Message:

New db.h from FreeBSD 5.1 (with new port).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/db.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r980 r981  
    3232 *
    3333 *      @(#)db.h        8.7 (Berkeley) 6/16/94
     34 * $FreeBSD: src/include/db.h,v 1.5 2002/03/26 01:35:05 bde Exp $
     35 */
     36
     37/** @file
     38 * FreeBSD 5.1
    3439 */
    3540
     
    3742#define _DB_H_
    3843
    39 #if defined (__cplusplus)
    40 extern "C" {
    41 #endif
    42 
    4344#include <sys/types.h>
    4445#include <sys/cdefs.h>
    4546
    4647#include <limits.h>
    47 
    48 #ifdef __DBINTERFACE_PRIVATE
    49 #include <compat.h>
    50 #endif
    5148
    5249#define RET_ERROR       -1              /* Return values. */
    5350#define RET_SUCCESS      0
    5451#define RET_SPECIAL      1
    55 
    56 #if 0
    57 #ifndef __BIT_TYPES_DEFINED__
    58 #define __BIT_TYPES_DEFINED__
    59 typedef __signed char              int8_t;
    60 typedef unsigned char            u_int8_t;
    61 typedef short                     int16_t;
    62 typedef unsigned short          u_int16_t;
    63 typedef int                       int32_t;
    64 typedef unsigned int            u_int32_t;
    65 #ifdef WE_DONT_NEED_QUADS
    66 typedef long long                 int64_t;
    67 typedef unsigned long long      u_int64_t;
    68 #endif
    69 #endif
    70 #else
    71 /*#include <sys/inttypes.h> */
    72 #endif
    7352
    7453#define MAX_PAGE_NUMBER 0xffffffff      /* >= # of pages in a file */
     
    126105typedef struct __db {
    127106        DBTYPE type;                    /* Underlying db type. */
    128         int (*close)    __P((struct __db *));
    129         int (*del)      __P((const struct __db *, const DBT *, u_int));
    130         int (*get)      __P((const struct __db *, const DBT *, DBT *, u_int));
    131         int (*put)      __P((const struct __db *, DBT *, const DBT *, u_int));
    132         int (*seq)      __P((const struct __db *, DBT *, DBT *, u_int));
    133         int (*sync)     __P((const struct __db *, u_int));
     107        int (*close)(struct __db *);
     108        int (*del)(const struct __db *, const DBT *, u_int);
     109        int (*get)(const struct __db *, const DBT *, DBT *, u_int);
     110        int (*put)(const struct __db *, DBT *, const DBT *, u_int);
     111        int (*seq)(const struct __db *, DBT *, DBT *, u_int);
     112        int (*sync)(const struct __db *, u_int);
    134113        void *internal;                 /* Access method private. */
    135         int (*fd)       __P((const struct __db *));
     114        int (*fd)(const struct __db *);
    136115} DB;
    137116
     
    148127        u_int   psize;          /* page size */
    149128        int     (*compare)      /* comparison function */
    150             __P((const DBT *, const DBT *));
     129            (const DBT *, const DBT *);
    151130        size_t  (*prefix)       /* prefix function */
    152             __P((const DBT *, const DBT *));
     131            (const DBT *, const DBT *);
    153132        int     lorder;         /* byte order */
    154133} BTREEINFO;
     
    164143        u_int   cachesize;      /* bytes to cache */
    165144        u_int32_t               /* hash function */
    166                 (*hash) __P((const void *, size_t));
     145                (*hash)(const void *, size_t);
    167146        int     lorder;         /* byte order */
    168147} HASHINFO;
     
    233212
    234213__BEGIN_DECLS
    235 DB *dbopen __P((const char *, int, int, DBTYPE, const void *));
     214DB *dbopen(const char *, int, int, DBTYPE, const void *);
    236215
    237216#ifdef __DBINTERFACE_PRIVATE
    238 DB      *__bt_open __P((const char *, int, int, const BTREEINFO *, int));
    239 DB      *__hash_open __P((const char *, int, int, const HASHINFO *, int));
    240 DB      *__rec_open __P((const char *, int, int, const RECNOINFO *, int));
    241 void     __dbpanic __P((DB *dbp));
     217DB      *__bt_open(const char *, int, int, const BTREEINFO *, int);
     218DB      *__hash_open(const char *, int, int, const HASHINFO *, int);
     219DB      *__rec_open(const char *, int, int, const RECNOINFO *, int);
     220void     __dbpanic(DB *dbp);
    242221#endif
    243222__END_DECLS
    244 
    245 #if defined (__cplusplus)
    246 }
    247 #endif
    248 
    249223#endif /* !_DB_H_ */
Note: See TracChangeset for help on using the changeset viewer.