Postfix3.3.1
総合概要
データ構造
ファイル
ファイル一覧
大域各種
postfix-3.3.1
src
global
mkmap_cdb.c
[詳解]
1
/*++
2
/* NAME
3
/* mkmap_cdb 3
4
/* SUMMARY
5
/* create or open database, CDB style
6
/* SYNOPSIS
7
/* #include <mkmap.h>
8
/*
9
/* MKMAP *mkmap_cdb_open(path)
10
/* const char *path;
11
/*
12
/* DESCRIPTION
13
/* This module implements support for creating DJB's CDB "constant
14
/* databases".
15
/*
16
/* mkmap_cdb_open() take a file name, append the ".cdb.tmp" suffix,
17
/* create the named DB database. On close, this file renamed to
18
/* file name with ".cdb" suffix appended (without ".tmp" part).
19
/* This routine is a CDB-specific helper for the more
20
/* general mkmap_open() interface.
21
/*
22
/* All errors are fatal.
23
/* SEE ALSO
24
/* dict_cdb(3), CDB dictionary interface.
25
/* LICENSE
26
/* .ad
27
/* .fi
28
/* The Secure Mailer license must be distributed with this software.
29
/* AUTHOR(S)
30
/* Written by Michael Tokarev <mjt@tls.msk.ru> based on mkmap_db by
31
/* Wietse Venema
32
/* IBM T.J. Watson Research
33
/* P.O. Box 704
34
/* Yorktown Heights, NY 10598, USA
35
/*--*/
36
37
/* System library. */
38
39
#include <
sys_defs.h
>
40
41
#ifdef HAS_CDB
42
43
/* Utility library. */
44
45
#include <
mymalloc.h
>
46
#include <
dict.h
>
47
48
/* Application-specific. */
49
50
#include "
mkmap.h
"
51
#include <
dict_cdb.h
>
52
53
/* This is a dummy module, since CDB has all the functionality
54
* built-in, as cdb creation requires one global lock anyway. */
55
56
MKMAP
*
mkmap_cdb_open
(
const
char
*unused_path)
57
{
58
MKMAP
*mkmap = (
MKMAP
*)
mymalloc
(
sizeof
(*mkmap));
59
mkmap->
open
=
dict_cdb_open
;
60
mkmap->
after_open
= 0;
61
mkmap->
after_close
= 0;
62
return
(mkmap);
63
}
64
65
#endif
/* HAS_CDB */
MKMAP::after_open
void(* after_open)(struct MKMAP *)
Definition:
mkmap.h:28
MKMAP::after_close
void(* after_close)(struct MKMAP *)
Definition:
mkmap.h:29
dict.h
dict_cdb.h
mkmap_cdb_open
MKMAP * mkmap_cdb_open(const char *)
mkmap.h
sys_defs.h
MKMAP
Definition:
mkmap.h:25
MKMAP::open
DICT_OPEN_FN open
Definition:
mkmap.h:26
dict_cdb_open
DICT * dict_cdb_open(const char *, int, int)
mymalloc.h
mymalloc
void * mymalloc(ssize_t len)
Definition:
mymalloc.c:150
2018年11月10日(土) 18時59分38秒作成 - Postfix3.3.1 / 構成:
1.8.9.1