Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / contrib / dlz / drivers / dlz_drivers.c
blobd547d12eff6b6dfa5543e6396693852106074c25
1 /* $NetBSD: dlz_drivers.c,v 1.5 2014/12/10 04:37:55 christos Exp $ */
3 /*
4 * Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
19 /* Id: dlz_drivers.c,v 1.4 2011/03/10 04:36:16 each Exp */
21 /*! \file */
23 #include <config.h>
25 #include <isc/result.h>
28 * Pull in declarations for this module's functions.
31 #include <dlz/dlz_drivers.h>
34 * Pull in driver-specific stuff.
37 #ifdef DLZ_STUB
38 #include <dlz/dlz_stub_driver.h>
39 #endif
41 #ifdef DLZ_POSTGRES
42 #include <dlz/dlz_postgres_driver.h>
43 #endif
45 #ifdef DLZ_MYSQL
46 #include <dlz/dlz_mysql_driver.h>
47 #endif
49 #ifdef DLZ_FILESYSTEM
50 #include <dlz/dlz_filesystem_driver.h>
51 #endif
53 #ifdef DLZ_BDB
54 #include <dlz/dlz_bdb_driver.h>
55 #include <dlz/dlz_bdbhpt_driver.h>
56 #endif
58 #ifdef DLZ_LDAP
59 #include <dlz/dlz_ldap_driver.h>
60 #endif
62 #ifdef DLZ_ODBC
63 #include <dlz/dlz_odbc_driver.h>
64 #endif
66 /*%
67 * Call init functions for all relevant DLZ drivers.
70 isc_result_t
71 dlz_drivers_init(void) {
73 isc_result_t result = ISC_R_SUCCESS;
75 #ifdef DLZ_STUB
76 result = dlz_stub_init();
77 if (result != ISC_R_SUCCESS)
78 return (result);
79 #endif
81 #ifdef DLZ_POSTGRES
82 result = dlz_postgres_init();
83 if (result != ISC_R_SUCCESS)
84 return (result);
85 #endif
87 #ifdef DLZ_MYSQL
88 result = dlz_mysql_init();
89 if (result != ISC_R_SUCCESS)
90 return (result);
91 #endif
93 #ifdef DLZ_FILESYSTEM
94 result = dlz_fs_init();
95 if (result != ISC_R_SUCCESS)
96 return (result);
97 #endif
99 #ifdef DLZ_BDB
100 result = dlz_bdb_init();
101 if (result != ISC_R_SUCCESS)
102 return (result);
103 result = dlz_bdbhpt_init();
104 if (result != ISC_R_SUCCESS)
105 return (result);
106 #endif
108 #ifdef DLZ_LDAP
109 result = dlz_ldap_init();
110 if (result != ISC_R_SUCCESS)
111 return (result);
112 #endif
114 #ifdef DLZ_ODBC
115 result = dlz_odbc_init();
116 if (result != ISC_R_SUCCESS)
117 return (result);
118 #endif
120 return (result);
124 * Call shutdown functions for all relevant DLZ drivers.
127 void
128 dlz_drivers_clear(void) {
130 #ifdef DLZ_STUB
131 dlz_stub_clear();
132 #endif
134 #ifdef DLZ_POSTGRES
135 dlz_postgres_clear();
136 #endif
138 #ifdef DLZ_MYSQL
139 dlz_mysql_clear();
140 #endif
142 #ifdef DLZ_FILESYSTEM
143 dlz_fs_clear();
144 #endif
146 #ifdef DLZ_BDB
147 dlz_bdb_clear();
148 dlz_bdbhpt_clear();
149 #endif
151 #ifdef DLZ_LDAP
152 dlz_ldap_clear();
153 #endif
155 #ifdef DLZ_ODBC
156 dlz_odbc_clear();
157 #endif