Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / mkmap_cdb.c
blob74bce14fc9d5d7ec666a42357f8b54416eece0b0
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* mkmap_cdb 3
6 /* SUMMARY
7 /* create or open database, CDB style
8 /* SYNOPSIS
9 /* #include <mkmap.h>
11 /* MKMAP *mkmap_cdb_open(path)
12 /* const char *path;
14 /* DESCRIPTION
15 /* This module implements support for creating DJB's CDB "constant
16 /* databases".
18 /* mkmap_cdb_open() take a file name, append the ".cdb.tmp" suffix,
19 /* create the named DB database. On close, this file renamed to
20 /* file name with ".cdb" suffix appended (without ".tmp" part).
21 /* This routine is a CDB-specific helper for the more
22 /* general mkmap_open() interface.
24 /* All errors are fatal.
25 /* SEE ALSO
26 /* dict_cdb(3), CDB dictionary interface.
27 /* LICENSE
28 /* .ad
29 /* .fi
30 /* The Secure Mailer license must be distributed with this software.
31 /* AUTHOR(S)
32 /* Written by Michael Tokarev <mjt@tls.msk.ru> based on mkmap_db by
33 /* Wietse Venema
34 /* IBM T.J. Watson Research
35 /* P.O. Box 704
36 /* Yorktown Heights, NY 10598, USA
37 /*--*/
39 /* System library. */
41 #include <sys_defs.h>
43 #ifdef HAS_CDB
45 /* Utility library. */
47 #include <mymalloc.h>
48 #include <dict.h>
50 /* Application-specific. */
52 #include "mkmap.h"
53 #include <dict_cdb.h>
55 /* This is a dummy module, since CDB has all the functionality
56 * built-in, as cdb creation requires one global lock anyway. */
58 MKMAP *mkmap_cdb_open(const char *unused_path)
60 MKMAP *mkmap = (MKMAP *) mymalloc(sizeof(*mkmap));
61 mkmap->open = dict_cdb_open;
62 mkmap->after_open = 0;
63 mkmap->after_close = 0;
64 return (mkmap);
67 #endif /* HAS_CDB */