/usr/include/postfix/sdbm.h is in postfix-dev 2.11.3-1+deb8u2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | /*++
/* NAME
/* sdbm 3h
/* SUMMARY
/* SDBM Simple DBM: ndbm work-alike hashed database library
/* SYNOPSIS
/* include "sdbm.h"
/* DESCRIPTION
/* .nf
/*--*/
#ifndef UTIL_SDBM_H
#define UTIL_SDBM_H
/*
* sdbm - ndbm work-alike hashed database library
* based on Per-Ake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
* author: oz@nexus.yorku.ca
* status: public domain.
*/
#define DUFF /* go ahead and use the loop-unrolled version */
#include <stdio.h>
#define DBLKSIZ 16384 /* SSL cert chains require more */
#define PBLKSIZ 8192 /* SSL cert chains require more */
#define PAIRMAX 8008 /* arbitrary on PBLKSIZ-N */
#define SPLTMAX 10 /* maximum allowed splits */
/* for a single insertion */
#define DIRFEXT ".dir"
#define PAGFEXT ".pag"
typedef struct {
int dirf; /* directory file descriptor */
int pagf; /* page file descriptor */
int flags; /* status/error flags, see below */
long blkptr; /* current block for nextkey */
int keyptr; /* current key for nextkey */
char pagbuf[PBLKSIZ]; /* page file block buffer */
char dirbuf[DBLKSIZ]; /* directory file block buffer */
} SDBM;
#define DBM_RDONLY 0x1 /* data base open read-only */
#define DBM_IOERR 0x2 /* data base I/O error */
/*
* utility macros
*/
#define sdbm_rdonly(db) ((db)->flags & DBM_RDONLY)
#define sdbm_error(db) ((db)->flags & DBM_IOERR)
#define sdbm_clearerr(db) ((db)->flags &= ~DBM_IOERR) /* ouch */
#define sdbm_dirfno(db) ((db)->dirf)
#define sdbm_pagfno(db) ((db)->pagf)
typedef struct {
char *dptr;
int dsize;
} datum;
extern datum nullitem;
/*
* flags to sdbm_store
*/
#define DBM_INSERT 0
#define DBM_REPLACE 1
/*
* ndbm interface
*/
extern SDBM *sdbm_open(char *, int, int);
extern void sdbm_close(SDBM *);
extern datum sdbm_fetch(SDBM *, datum);
extern int sdbm_delete(SDBM *, datum);
extern int sdbm_store(SDBM *, datum, datum, int);
extern datum sdbm_firstkey(SDBM *);
extern datum sdbm_nextkey(SDBM *);
/*
* sdbm - ndbm work-alike hashed database library
* tuning and portability constructs [not nearly enough]
* author: oz@nexus.yorku.ca
*/
#define BYTESIZ 8
/*
* important tuning parms (hah)
*/
#define SEEDUPS /* always detect duplicates */
#define BADMESS /* generate a message for worst case:
cannot make room after SPLTMAX splits */
#endif /* UTIL_SDBM_H */
|