Deleted Added
full compact
config.h.in (266114) config.h.in (276605)
1/* config.h.in. Generated from configure.ac by autoheader. */
2
3/* Directory to chroot to */
4#undef CHROOT_DIR
5
1/* config.h.in. Generated from configure.ac by autoheader. */
2
3/* Directory to chroot to */
4#undef CHROOT_DIR
5
6/* Do sha512 definitions in config.h */
7#undef COMPAT_SHA512
8
6/* Pathname to the Unbound configuration file */
7#undef CONFIGFILE
8
9/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
10 */
11#undef DARWIN_BROKEN_SETREUID
12
13/* Whether daemon is deprecated */
14#undef DEPRECATED_DAEMON
15
9/* Pathname to the Unbound configuration file */
10#undef CONFIGFILE
11
12/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
13 */
14#undef DARWIN_BROKEN_SETREUID
15
16/* Whether daemon is deprecated */
17#undef DEPRECATED_DAEMON
18
19/* default dnstap socket path */
20#undef DNSTAP_SOCKET_PATH
21
16/* Define if you want to use debug lock checking (slow). */
17#undef ENABLE_LOCK_CHECKS
18
19/* Define this if you enabled-allsymbols from libunbound to link binaries to
20 it for smaller install size, but the libunbound export table is polluted by
21 internal symbols */
22#undef EXPORT_ALL_SYMBOLS
23
22/* Define if you want to use debug lock checking (slow). */
23#undef ENABLE_LOCK_CHECKS
24
25/* Define this if you enabled-allsymbols from libunbound to link binaries to
26 it for smaller install size, but the libunbound export table is polluted by
27 internal symbols */
28#undef EXPORT_ALL_SYMBOLS
29
30/* Define to 1 if you have the `arc4random' function. */
31#undef HAVE_ARC4RANDOM
32
33/* Define to 1 if you have the `arc4random_uniform' function. */
34#undef HAVE_ARC4RANDOM_UNIFORM
35
24/* Define to 1 if you have the <arpa/inet.h> header file. */
25#undef HAVE_ARPA_INET_H
26
27/* Whether the C compiler accepts the "format" attribute */
28#undef HAVE_ATTR_FORMAT
29
30/* Whether the C compiler accepts the "unused" attribute */
31#undef HAVE_ATTR_UNUSED
32
33/* Define to 1 if your system has a working `chown' function. */
34#undef HAVE_CHOWN
35
36/* Define to 1 if you have the `chroot' function. */
37#undef HAVE_CHROOT
38
39/* Define to 1 if you have the `ctime_r' function. */
40#undef HAVE_CTIME_R
41
42/* Define to 1 if you have the `daemon' function. */
43#undef HAVE_DAEMON
44
36/* Define to 1 if you have the <arpa/inet.h> header file. */
37#undef HAVE_ARPA_INET_H
38
39/* Whether the C compiler accepts the "format" attribute */
40#undef HAVE_ATTR_FORMAT
41
42/* Whether the C compiler accepts the "unused" attribute */
43#undef HAVE_ATTR_UNUSED
44
45/* Define to 1 if your system has a working `chown' function. */
46#undef HAVE_CHOWN
47
48/* Define to 1 if you have the `chroot' function. */
49#undef HAVE_CHROOT
50
51/* Define to 1 if you have the `ctime_r' function. */
52#undef HAVE_CTIME_R
53
54/* Define to 1 if you have the `daemon' function. */
55#undef HAVE_DAEMON
56
57/* Define to 1 if you have the declaration of `arc4random', and to 0 if you
58 don't. */
59#undef HAVE_DECL_ARC4RANDOM
60
61/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
62 if you don't. */
63#undef HAVE_DECL_ARC4RANDOM_UNIFORM
64
45/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
46 don't. */
47#undef HAVE_DECL_NID_SECP384R1
48
49/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
50 if you don't. */
51#undef HAVE_DECL_NID_X9_62_PRIME256V1
52
53/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
54 if you don't. */
55#undef HAVE_DECL_SK_SSL_COMP_POP_FREE
56
57/* Define to 1 if you have the declaration of
58 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
59#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
60
65/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
66 don't. */
67#undef HAVE_DECL_NID_SECP384R1
68
69/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
70 if you don't. */
71#undef HAVE_DECL_NID_X9_62_PRIME256V1
72
73/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
74 if you don't. */
75#undef HAVE_DECL_SK_SSL_COMP_POP_FREE
76
77/* Define to 1 if you have the declaration of
78 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
79#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
80
81/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
82 don't. */
83#undef HAVE_DECL_STRLCAT
84
85/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
86 don't. */
87#undef HAVE_DECL_STRLCPY
88
61/* Define to 1 if you have the <dlfcn.h> header file. */
62#undef HAVE_DLFCN_H
63
89/* Define to 1 if you have the <dlfcn.h> header file. */
90#undef HAVE_DLFCN_H
91
92/* Define to 1 if you have the <endian.h> header file. */
93#undef HAVE_ENDIAN_H
94
64/* Define to 1 if you have the `endprotoent' function. */
65#undef HAVE_ENDPROTOENT
66
67/* Define to 1 if you have the `endservent' function. */
68#undef HAVE_ENDSERVENT
69
70/* Define to 1 if you have the `event_base_free' function. */
71#undef HAVE_EVENT_BASE_FREE
72
73/* Define to 1 if you have the `event_base_get_method' function. */
74#undef HAVE_EVENT_BASE_GET_METHOD
75
76/* Define to 1 if you have the `event_base_new' function. */
77#undef HAVE_EVENT_BASE_NEW
78
79/* Define to 1 if you have the `event_base_once' function. */
80#undef HAVE_EVENT_BASE_ONCE
81
82/* Define to 1 if you have the <event.h> header file. */
83#undef HAVE_EVENT_H
84
85/* Define to 1 if you have the `EVP_sha1' function. */
86#undef HAVE_EVP_SHA1
87
88/* Define to 1 if you have the `EVP_sha256' function. */
89#undef HAVE_EVP_SHA256
90
91/* Define to 1 if you have the `EVP_sha512' function. */
92#undef HAVE_EVP_SHA512
93
94/* Define to 1 if you have the `ev_default_loop' function. */
95#undef HAVE_EV_DEFAULT_LOOP
96
97/* Define to 1 if you have the `ev_loop' function. */
98#undef HAVE_EV_LOOP
99
100/* Define to 1 if you have the <expat.h> header file. */
101#undef HAVE_EXPAT_H
102
103/* Define to 1 if you have the `fcntl' function. */
104#undef HAVE_FCNTL
105
106/* Define to 1 if you have the `FIPS_mode' function. */
107#undef HAVE_FIPS_MODE
108
109/* Define to 1 if you have the `fork' function. */
110#undef HAVE_FORK
111
112/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
113#undef HAVE_FSEEKO
114
115/* Whether getaddrinfo is available */
116#undef HAVE_GETADDRINFO
117
95/* Define to 1 if you have the `endprotoent' function. */
96#undef HAVE_ENDPROTOENT
97
98/* Define to 1 if you have the `endservent' function. */
99#undef HAVE_ENDSERVENT
100
101/* Define to 1 if you have the `event_base_free' function. */
102#undef HAVE_EVENT_BASE_FREE
103
104/* Define to 1 if you have the `event_base_get_method' function. */
105#undef HAVE_EVENT_BASE_GET_METHOD
106
107/* Define to 1 if you have the `event_base_new' function. */
108#undef HAVE_EVENT_BASE_NEW
109
110/* Define to 1 if you have the `event_base_once' function. */
111#undef HAVE_EVENT_BASE_ONCE
112
113/* Define to 1 if you have the <event.h> header file. */
114#undef HAVE_EVENT_H
115
116/* Define to 1 if you have the `EVP_sha1' function. */
117#undef HAVE_EVP_SHA1
118
119/* Define to 1 if you have the `EVP_sha256' function. */
120#undef HAVE_EVP_SHA256
121
122/* Define to 1 if you have the `EVP_sha512' function. */
123#undef HAVE_EVP_SHA512
124
125/* Define to 1 if you have the `ev_default_loop' function. */
126#undef HAVE_EV_DEFAULT_LOOP
127
128/* Define to 1 if you have the `ev_loop' function. */
129#undef HAVE_EV_LOOP
130
131/* Define to 1 if you have the <expat.h> header file. */
132#undef HAVE_EXPAT_H
133
134/* Define to 1 if you have the `fcntl' function. */
135#undef HAVE_FCNTL
136
137/* Define to 1 if you have the `FIPS_mode' function. */
138#undef HAVE_FIPS_MODE
139
140/* Define to 1 if you have the `fork' function. */
141#undef HAVE_FORK
142
143/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
144#undef HAVE_FSEEKO
145
146/* Whether getaddrinfo is available */
147#undef HAVE_GETADDRINFO
148
149/* Define to 1 if you have the `getentropy' function. */
150#undef HAVE_GETENTROPY
151
118/* Define to 1 if you have the <getopt.h> header file. */
119#undef HAVE_GETOPT_H
120
121/* Define to 1 if you have the `getpwnam' function. */
122#undef HAVE_GETPWNAM
123
124/* Define to 1 if you have the `getrlimit' function. */
125#undef HAVE_GETRLIMIT
126
127/* Define to 1 if you have the `glob' function. */
128#undef HAVE_GLOB
129
130/* Define to 1 if you have the <glob.h> header file. */
131#undef HAVE_GLOB_H
132
133/* Define to 1 if you have the `gmtime_r' function. */
134#undef HAVE_GMTIME_R
135
136/* Define to 1 if you have the <grp.h> header file. */
137#undef HAVE_GRP_H
138
139/* If you have HMAC_CTX_init */
140#undef HAVE_HMAC_CTX_INIT
141
142/* Define to 1 if you have the `inet_aton' function. */
143#undef HAVE_INET_ATON
144
145/* Define to 1 if you have the `inet_ntop' function. */
146#undef HAVE_INET_NTOP
147
148/* Define to 1 if you have the `inet_pton' function. */
149#undef HAVE_INET_PTON
150
151/* Define to 1 if you have the `initgroups' function. */
152#undef HAVE_INITGROUPS
153
154/* Define to 1 if you have the <inttypes.h> header file. */
155#undef HAVE_INTTYPES_H
156
157/* if the function 'ioctlsocket' is available */
158#undef HAVE_IOCTLSOCKET
159
160/* Define to 1 if you have the <iphlpapi.h> header file. */
161#undef HAVE_IPHLPAPI_H
162
163/* Define to 1 if you have the `kill' function. */
164#undef HAVE_KILL
165
152/* Define to 1 if you have the <getopt.h> header file. */
153#undef HAVE_GETOPT_H
154
155/* Define to 1 if you have the `getpwnam' function. */
156#undef HAVE_GETPWNAM
157
158/* Define to 1 if you have the `getrlimit' function. */
159#undef HAVE_GETRLIMIT
160
161/* Define to 1 if you have the `glob' function. */
162#undef HAVE_GLOB
163
164/* Define to 1 if you have the <glob.h> header file. */
165#undef HAVE_GLOB_H
166
167/* Define to 1 if you have the `gmtime_r' function. */
168#undef HAVE_GMTIME_R
169
170/* Define to 1 if you have the <grp.h> header file. */
171#undef HAVE_GRP_H
172
173/* If you have HMAC_CTX_init */
174#undef HAVE_HMAC_CTX_INIT
175
176/* Define to 1 if you have the `inet_aton' function. */
177#undef HAVE_INET_ATON
178
179/* Define to 1 if you have the `inet_ntop' function. */
180#undef HAVE_INET_NTOP
181
182/* Define to 1 if you have the `inet_pton' function. */
183#undef HAVE_INET_PTON
184
185/* Define to 1 if you have the `initgroups' function. */
186#undef HAVE_INITGROUPS
187
188/* Define to 1 if you have the <inttypes.h> header file. */
189#undef HAVE_INTTYPES_H
190
191/* if the function 'ioctlsocket' is available */
192#undef HAVE_IOCTLSOCKET
193
194/* Define to 1 if you have the <iphlpapi.h> header file. */
195#undef HAVE_IPHLPAPI_H
196
197/* Define to 1 if you have the `kill' function. */
198#undef HAVE_KILL
199
200/* Define if we have LibreSSL */
201#undef HAVE_LIBRESSL
202
166/* Define to 1 if you have the `localtime_r' function. */
167#undef HAVE_LOCALTIME_R
168
169/* Define to 1 if you have the <login_cap.h> header file. */
170#undef HAVE_LOGIN_CAP_H
171
172/* If have GNU libc compatible malloc */
173#undef HAVE_MALLOC
174
175/* Define to 1 if you have the `memmove' function. */
176#undef HAVE_MEMMOVE
177
178/* Define to 1 if you have the <memory.h> header file. */
179#undef HAVE_MEMORY_H
180
181/* Define to 1 if you have the <netdb.h> header file. */
182#undef HAVE_NETDB_H
183
184/* Define to 1 if you have the <netinet/in.h> header file. */
185#undef HAVE_NETINET_IN_H
186
187/* Use libnss for crypto */
188#undef HAVE_NSS
189
190/* Define to 1 if you have the `OPENSSL_config' function. */
191#undef HAVE_OPENSSL_CONFIG
192
193/* Define to 1 if you have the <openssl/conf.h> header file. */
194#undef HAVE_OPENSSL_CONF_H
195
196/* Define to 1 if you have the <openssl/engine.h> header file. */
197#undef HAVE_OPENSSL_ENGINE_H
198
199/* Define to 1 if you have the <openssl/err.h> header file. */
200#undef HAVE_OPENSSL_ERR_H
201
202/* Define to 1 if you have the <openssl/rand.h> header file. */
203#undef HAVE_OPENSSL_RAND_H
204
205/* Define to 1 if you have the <openssl/ssl.h> header file. */
206#undef HAVE_OPENSSL_SSL_H
207
208/* Define if you have POSIX threads libraries and header files. */
209#undef HAVE_PTHREAD
210
211/* Have PTHREAD_PRIO_INHERIT. */
212#undef HAVE_PTHREAD_PRIO_INHERIT
213
214/* Define to 1 if the system has the type `pthread_rwlock_t'. */
215#undef HAVE_PTHREAD_RWLOCK_T
216
217/* Define to 1 if the system has the type `pthread_spinlock_t'. */
218#undef HAVE_PTHREAD_SPINLOCK_T
219
220/* Define to 1 if you have the <pwd.h> header file. */
221#undef HAVE_PWD_H
222
223/* Define if you have Python libraries and header files. */
224#undef HAVE_PYTHON
225
226/* Define to 1 if you have the `random' function. */
227#undef HAVE_RANDOM
228
229/* Define to 1 if you have the `recvmsg' function. */
230#undef HAVE_RECVMSG
231
232/* Define to 1 if you have the `sbrk' function. */
233#undef HAVE_SBRK
234
235/* Define to 1 if you have the `sendmsg' function. */
236#undef HAVE_SENDMSG
237
238/* Define to 1 if you have the `setregid' function. */
239#undef HAVE_SETREGID
240
241/* Define to 1 if you have the `setresgid' function. */
242#undef HAVE_SETRESGID
243
244/* Define to 1 if you have the `setresuid' function. */
245#undef HAVE_SETRESUID
246
247/* Define to 1 if you have the `setreuid' function. */
248#undef HAVE_SETREUID
249
250/* Define to 1 if you have the `setrlimit' function. */
251#undef HAVE_SETRLIMIT
252
253/* Define to 1 if you have the `setsid' function. */
254#undef HAVE_SETSID
255
256/* Define to 1 if you have the `setusercontext' function. */
257#undef HAVE_SETUSERCONTEXT
258
203/* Define to 1 if you have the `localtime_r' function. */
204#undef HAVE_LOCALTIME_R
205
206/* Define to 1 if you have the <login_cap.h> header file. */
207#undef HAVE_LOGIN_CAP_H
208
209/* If have GNU libc compatible malloc */
210#undef HAVE_MALLOC
211
212/* Define to 1 if you have the `memmove' function. */
213#undef HAVE_MEMMOVE
214
215/* Define to 1 if you have the <memory.h> header file. */
216#undef HAVE_MEMORY_H
217
218/* Define to 1 if you have the <netdb.h> header file. */
219#undef HAVE_NETDB_H
220
221/* Define to 1 if you have the <netinet/in.h> header file. */
222#undef HAVE_NETINET_IN_H
223
224/* Use libnss for crypto */
225#undef HAVE_NSS
226
227/* Define to 1 if you have the `OPENSSL_config' function. */
228#undef HAVE_OPENSSL_CONFIG
229
230/* Define to 1 if you have the <openssl/conf.h> header file. */
231#undef HAVE_OPENSSL_CONF_H
232
233/* Define to 1 if you have the <openssl/engine.h> header file. */
234#undef HAVE_OPENSSL_ENGINE_H
235
236/* Define to 1 if you have the <openssl/err.h> header file. */
237#undef HAVE_OPENSSL_ERR_H
238
239/* Define to 1 if you have the <openssl/rand.h> header file. */
240#undef HAVE_OPENSSL_RAND_H
241
242/* Define to 1 if you have the <openssl/ssl.h> header file. */
243#undef HAVE_OPENSSL_SSL_H
244
245/* Define if you have POSIX threads libraries and header files. */
246#undef HAVE_PTHREAD
247
248/* Have PTHREAD_PRIO_INHERIT. */
249#undef HAVE_PTHREAD_PRIO_INHERIT
250
251/* Define to 1 if the system has the type `pthread_rwlock_t'. */
252#undef HAVE_PTHREAD_RWLOCK_T
253
254/* Define to 1 if the system has the type `pthread_spinlock_t'. */
255#undef HAVE_PTHREAD_SPINLOCK_T
256
257/* Define to 1 if you have the <pwd.h> header file. */
258#undef HAVE_PWD_H
259
260/* Define if you have Python libraries and header files. */
261#undef HAVE_PYTHON
262
263/* Define to 1 if you have the `random' function. */
264#undef HAVE_RANDOM
265
266/* Define to 1 if you have the `recvmsg' function. */
267#undef HAVE_RECVMSG
268
269/* Define to 1 if you have the `sbrk' function. */
270#undef HAVE_SBRK
271
272/* Define to 1 if you have the `sendmsg' function. */
273#undef HAVE_SENDMSG
274
275/* Define to 1 if you have the `setregid' function. */
276#undef HAVE_SETREGID
277
278/* Define to 1 if you have the `setresgid' function. */
279#undef HAVE_SETRESGID
280
281/* Define to 1 if you have the `setresuid' function. */
282#undef HAVE_SETRESUID
283
284/* Define to 1 if you have the `setreuid' function. */
285#undef HAVE_SETREUID
286
287/* Define to 1 if you have the `setrlimit' function. */
288#undef HAVE_SETRLIMIT
289
290/* Define to 1 if you have the `setsid' function. */
291#undef HAVE_SETSID
292
293/* Define to 1 if you have the `setusercontext' function. */
294#undef HAVE_SETUSERCONTEXT
295
296/* Define to 1 if you have the `SHA512_Update' function. */
297#undef HAVE_SHA512_UPDATE
298
259/* Define to 1 if you have the `sigprocmask' function. */
260#undef HAVE_SIGPROCMASK
261
262/* Define to 1 if you have the `sleep' function. */
263#undef HAVE_SLEEP
264
265/* Define to 1 if you have the `snprintf' function. */
266#undef HAVE_SNPRINTF
267
268/* Define to 1 if you have the `socketpair' function. */
269#undef HAVE_SOCKETPAIR
270
271/* Using Solaris threads */
272#undef HAVE_SOLARIS_THREADS
273
274/* Define to 1 if you have the `srandom' function. */
275#undef HAVE_SRANDOM
276
277/* Define if you have the SSL libraries installed. */
278#undef HAVE_SSL
279
280/* Define to 1 if you have the <stdarg.h> header file. */
281#undef HAVE_STDARG_H
282
283/* Define to 1 if you have the <stdbool.h> header file. */
284#undef HAVE_STDBOOL_H
285
286/* Define to 1 if you have the <stdint.h> header file. */
287#undef HAVE_STDINT_H
288
289/* Define to 1 if you have the <stdlib.h> header file. */
290#undef HAVE_STDLIB_H
291
292/* Define to 1 if you have the `strftime' function. */
293#undef HAVE_STRFTIME
294
295/* Define to 1 if you have the <strings.h> header file. */
296#undef HAVE_STRINGS_H
297
298/* Define to 1 if you have the <string.h> header file. */
299#undef HAVE_STRING_H
300
301/* Define to 1 if you have the `strlcat' function. */
302#undef HAVE_STRLCAT
303
304/* Define to 1 if you have the `strlcpy' function. */
305#undef HAVE_STRLCPY
306
307/* Define to 1 if you have the `strptime' function. */
308#undef HAVE_STRPTIME
309
310/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
311#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
312
313/* Define if you have Swig libraries and header files. */
314#undef HAVE_SWIG
315
316/* Define to 1 if you have the <syslog.h> header file. */
317#undef HAVE_SYSLOG_H
318
319/* Define to 1 if you have the <sys/param.h> header file. */
320#undef HAVE_SYS_PARAM_H
321
322/* Define to 1 if you have the <sys/resource.h> header file. */
323#undef HAVE_SYS_RESOURCE_H
324
299/* Define to 1 if you have the `sigprocmask' function. */
300#undef HAVE_SIGPROCMASK
301
302/* Define to 1 if you have the `sleep' function. */
303#undef HAVE_SLEEP
304
305/* Define to 1 if you have the `snprintf' function. */
306#undef HAVE_SNPRINTF
307
308/* Define to 1 if you have the `socketpair' function. */
309#undef HAVE_SOCKETPAIR
310
311/* Using Solaris threads */
312#undef HAVE_SOLARIS_THREADS
313
314/* Define to 1 if you have the `srandom' function. */
315#undef HAVE_SRANDOM
316
317/* Define if you have the SSL libraries installed. */
318#undef HAVE_SSL
319
320/* Define to 1 if you have the <stdarg.h> header file. */
321#undef HAVE_STDARG_H
322
323/* Define to 1 if you have the <stdbool.h> header file. */
324#undef HAVE_STDBOOL_H
325
326/* Define to 1 if you have the <stdint.h> header file. */
327#undef HAVE_STDINT_H
328
329/* Define to 1 if you have the <stdlib.h> header file. */
330#undef HAVE_STDLIB_H
331
332/* Define to 1 if you have the `strftime' function. */
333#undef HAVE_STRFTIME
334
335/* Define to 1 if you have the <strings.h> header file. */
336#undef HAVE_STRINGS_H
337
338/* Define to 1 if you have the <string.h> header file. */
339#undef HAVE_STRING_H
340
341/* Define to 1 if you have the `strlcat' function. */
342#undef HAVE_STRLCAT
343
344/* Define to 1 if you have the `strlcpy' function. */
345#undef HAVE_STRLCPY
346
347/* Define to 1 if you have the `strptime' function. */
348#undef HAVE_STRPTIME
349
350/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
351#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
352
353/* Define if you have Swig libraries and header files. */
354#undef HAVE_SWIG
355
356/* Define to 1 if you have the <syslog.h> header file. */
357#undef HAVE_SYSLOG_H
358
359/* Define to 1 if you have the <sys/param.h> header file. */
360#undef HAVE_SYS_PARAM_H
361
362/* Define to 1 if you have the <sys/resource.h> header file. */
363#undef HAVE_SYS_RESOURCE_H
364
365/* Define to 1 if you have the <sys/sha2.h> header file. */
366#undef HAVE_SYS_SHA2_H
367
325/* Define to 1 if you have the <sys/socket.h> header file. */
326#undef HAVE_SYS_SOCKET_H
327
328/* Define to 1 if you have the <sys/stat.h> header file. */
329#undef HAVE_SYS_STAT_H
330
368/* Define to 1 if you have the <sys/socket.h> header file. */
369#undef HAVE_SYS_SOCKET_H
370
371/* Define to 1 if you have the <sys/stat.h> header file. */
372#undef HAVE_SYS_STAT_H
373
374/* Define to 1 if you have the <sys/sysctl.h> header file. */
375#undef HAVE_SYS_SYSCTL_H
376
331/* Define to 1 if you have the <sys/types.h> header file. */
332#undef HAVE_SYS_TYPES_H
333
334/* Define to 1 if you have the <sys/uio.h> header file. */
335#undef HAVE_SYS_UIO_H
336
337/* Define to 1 if you have the <sys/wait.h> header file. */
338#undef HAVE_SYS_WAIT_H
339
340/* Define to 1 if you have the <time.h> header file. */
341#undef HAVE_TIME_H
342
343/* Define to 1 if you have the `tzset' function. */
344#undef HAVE_TZSET
345
346/* Define to 1 if you have the <unistd.h> header file. */
347#undef HAVE_UNISTD_H
348
349/* Define to 1 if you have the `usleep' function. */
350#undef HAVE_USLEEP
351
352/* Define to 1 if you have the `vfork' function. */
353#undef HAVE_VFORK
354
355/* Define to 1 if you have the <vfork.h> header file. */
356#undef HAVE_VFORK_H
357
358/* Define to 1 if you have the <windows.h> header file. */
359#undef HAVE_WINDOWS_H
360
361/* Using Windows threads */
362#undef HAVE_WINDOWS_THREADS
363
364/* Define to 1 if you have the <winsock2.h> header file. */
365#undef HAVE_WINSOCK2_H
366
367/* Define to 1 if `fork' works. */
368#undef HAVE_WORKING_FORK
369
370/* Define to 1 if `vfork' works. */
371#undef HAVE_WORKING_VFORK
372
373/* Define to 1 if you have the `writev' function. */
374#undef HAVE_WRITEV
375
376/* Define to 1 if you have the <ws2tcpip.h> header file. */
377#undef HAVE_WS2TCPIP_H
378
379/* Define to 1 if you have the `_beginthreadex' function. */
380#undef HAVE__BEGINTHREADEX
381
382/* if lex has yylex_destroy */
383#undef LEX_HAS_YYLEX_DESTROY
384
377/* Define to 1 if you have the <sys/types.h> header file. */
378#undef HAVE_SYS_TYPES_H
379
380/* Define to 1 if you have the <sys/uio.h> header file. */
381#undef HAVE_SYS_UIO_H
382
383/* Define to 1 if you have the <sys/wait.h> header file. */
384#undef HAVE_SYS_WAIT_H
385
386/* Define to 1 if you have the <time.h> header file. */
387#undef HAVE_TIME_H
388
389/* Define to 1 if you have the `tzset' function. */
390#undef HAVE_TZSET
391
392/* Define to 1 if you have the <unistd.h> header file. */
393#undef HAVE_UNISTD_H
394
395/* Define to 1 if you have the `usleep' function. */
396#undef HAVE_USLEEP
397
398/* Define to 1 if you have the `vfork' function. */
399#undef HAVE_VFORK
400
401/* Define to 1 if you have the <vfork.h> header file. */
402#undef HAVE_VFORK_H
403
404/* Define to 1 if you have the <windows.h> header file. */
405#undef HAVE_WINDOWS_H
406
407/* Using Windows threads */
408#undef HAVE_WINDOWS_THREADS
409
410/* Define to 1 if you have the <winsock2.h> header file. */
411#undef HAVE_WINSOCK2_H
412
413/* Define to 1 if `fork' works. */
414#undef HAVE_WORKING_FORK
415
416/* Define to 1 if `vfork' works. */
417#undef HAVE_WORKING_VFORK
418
419/* Define to 1 if you have the `writev' function. */
420#undef HAVE_WRITEV
421
422/* Define to 1 if you have the <ws2tcpip.h> header file. */
423#undef HAVE_WS2TCPIP_H
424
425/* Define to 1 if you have the `_beginthreadex' function. */
426#undef HAVE__BEGINTHREADEX
427
428/* if lex has yylex_destroy */
429#undef LEX_HAS_YYLEX_DESTROY
430
385/* Define to the sub-directory in which libtool stores uninstalled libraries.
386 */
431/* Define to the sub-directory where libtool stores uninstalled libraries. */
387#undef LT_OBJDIR
388
389/* Define to the maximum message length to pass to syslog. */
390#undef MAXSYSLOGMSGLEN
391
392/* Define if memcmp() does not compare unsigned bytes */
393#undef MEMCMP_IS_BROKEN
394
395/* Define if mkdir has one argument. */
396#undef MKDIR_HAS_ONE_ARG
397
398/* Define if the network stack does not fully support nonblocking io (causes
399 lower performance). */
400#undef NONBLOCKING_IS_BROKEN
401
402/* Put -D_ALL_SOURCE define in config.h */
403#undef OMITTED__D_ALL_SOURCE
404
405/* Put -D_BSD_SOURCE define in config.h */
406#undef OMITTED__D_BSD_SOURCE
407
408/* Put -D_GNU_SOURCE define in config.h */
409#undef OMITTED__D_GNU_SOURCE
410
411/* Put -D_LARGEFILE_SOURCE=1 define in config.h */
412#undef OMITTED__D_LARGEFILE_SOURCE_1
413
414/* Put -D_POSIX_C_SOURCE=200112 define in config.h */
415#undef OMITTED__D_POSIX_C_SOURCE_200112
416
417/* Put -D_XOPEN_SOURCE=600 define in config.h */
418#undef OMITTED__D_XOPEN_SOURCE_600
419
420/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
421#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1
422
423/* Put -D__EXTENSIONS__ define in config.h */
424#undef OMITTED__D__EXTENSIONS__
425
426/* Define to the address where bug reports for this package should be sent. */
427#undef PACKAGE_BUGREPORT
428
429/* Define to the full name of this package. */
430#undef PACKAGE_NAME
431
432/* Define to the full name and version of this package. */
433#undef PACKAGE_STRING
434
435/* Define to the one symbol short name of this package. */
436#undef PACKAGE_TARNAME
437
438/* Define to the home page for this package. */
439#undef PACKAGE_URL
440
441/* Define to the version of this package. */
442#undef PACKAGE_VERSION
443
444/* default pidfile location */
445#undef PIDFILE
446
447/* Define to necessary symbol if this constant uses a non-standard name on
448 your system. */
449#undef PTHREAD_CREATE_JOINABLE
450
451/* Define as the return type of signal handlers (`int' or `void'). */
452#undef RETSIGTYPE
453
454/* default rootkey location */
455#undef ROOT_ANCHOR_FILE
456
457/* default rootcert location */
458#undef ROOT_CERT_FILE
459
460/* version number for resource files */
461#undef RSRC_PACKAGE_VERSION
462
463/* Directory to chdir to */
464#undef RUN_DIR
465
466/* Shared data */
467#undef SHARE_DIR
468
469/* The size of `time_t', as computed by sizeof. */
470#undef SIZEOF_TIME_T
471
472/* Define to 1 if you have the ANSI C header files. */
473#undef STDC_HEADERS
474
475/* use default strptime. */
476#undef STRPTIME_WORKS
477
478/* Use win32 resources and API */
479#undef UB_ON_WINDOWS
480
481/* default username */
482#undef UB_USERNAME
483
484/* use to enable lightweight alloc assertions, for debug use */
485#undef UNBOUND_ALLOC_LITE
486
487/* use malloc not regions, for debug use */
488#undef UNBOUND_ALLOC_NONREGIONAL
489
490/* use statistics for allocs and frees, for debug use */
491#undef UNBOUND_ALLOC_STATS
492
493/* define this to enable debug checks. */
494#undef UNBOUND_DEBUG
495
432#undef LT_OBJDIR
433
434/* Define to the maximum message length to pass to syslog. */
435#undef MAXSYSLOGMSGLEN
436
437/* Define if memcmp() does not compare unsigned bytes */
438#undef MEMCMP_IS_BROKEN
439
440/* Define if mkdir has one argument. */
441#undef MKDIR_HAS_ONE_ARG
442
443/* Define if the network stack does not fully support nonblocking io (causes
444 lower performance). */
445#undef NONBLOCKING_IS_BROKEN
446
447/* Put -D_ALL_SOURCE define in config.h */
448#undef OMITTED__D_ALL_SOURCE
449
450/* Put -D_BSD_SOURCE define in config.h */
451#undef OMITTED__D_BSD_SOURCE
452
453/* Put -D_GNU_SOURCE define in config.h */
454#undef OMITTED__D_GNU_SOURCE
455
456/* Put -D_LARGEFILE_SOURCE=1 define in config.h */
457#undef OMITTED__D_LARGEFILE_SOURCE_1
458
459/* Put -D_POSIX_C_SOURCE=200112 define in config.h */
460#undef OMITTED__D_POSIX_C_SOURCE_200112
461
462/* Put -D_XOPEN_SOURCE=600 define in config.h */
463#undef OMITTED__D_XOPEN_SOURCE_600
464
465/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
466#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1
467
468/* Put -D__EXTENSIONS__ define in config.h */
469#undef OMITTED__D__EXTENSIONS__
470
471/* Define to the address where bug reports for this package should be sent. */
472#undef PACKAGE_BUGREPORT
473
474/* Define to the full name of this package. */
475#undef PACKAGE_NAME
476
477/* Define to the full name and version of this package. */
478#undef PACKAGE_STRING
479
480/* Define to the one symbol short name of this package. */
481#undef PACKAGE_TARNAME
482
483/* Define to the home page for this package. */
484#undef PACKAGE_URL
485
486/* Define to the version of this package. */
487#undef PACKAGE_VERSION
488
489/* default pidfile location */
490#undef PIDFILE
491
492/* Define to necessary symbol if this constant uses a non-standard name on
493 your system. */
494#undef PTHREAD_CREATE_JOINABLE
495
496/* Define as the return type of signal handlers (`int' or `void'). */
497#undef RETSIGTYPE
498
499/* default rootkey location */
500#undef ROOT_ANCHOR_FILE
501
502/* default rootcert location */
503#undef ROOT_CERT_FILE
504
505/* version number for resource files */
506#undef RSRC_PACKAGE_VERSION
507
508/* Directory to chdir to */
509#undef RUN_DIR
510
511/* Shared data */
512#undef SHARE_DIR
513
514/* The size of `time_t', as computed by sizeof. */
515#undef SIZEOF_TIME_T
516
517/* Define to 1 if you have the ANSI C header files. */
518#undef STDC_HEADERS
519
520/* use default strptime. */
521#undef STRPTIME_WORKS
522
523/* Use win32 resources and API */
524#undef UB_ON_WINDOWS
525
526/* default username */
527#undef UB_USERNAME
528
529/* use to enable lightweight alloc assertions, for debug use */
530#undef UNBOUND_ALLOC_LITE
531
532/* use malloc not regions, for debug use */
533#undef UNBOUND_ALLOC_NONREGIONAL
534
535/* use statistics for allocs and frees, for debug use */
536#undef UNBOUND_ALLOC_STATS
537
538/* define this to enable debug checks. */
539#undef UNBOUND_DEBUG
540
541/* Define to 1 to enable dnstap support */
542#undef USE_DNSTAP
543
496/* Define this to enable ECDSA support. */
497#undef USE_ECDSA
498
499/* Define this to enable an EVP workaround for older openssl */
500#undef USE_ECDSA_EVP_WORKAROUND
501
502/* Define this to enable GOST support. */
503#undef USE_GOST
504
505/* Define if you want to use internal select based events */
506#undef USE_MINI_EVENT
507
508/* Define this to enable SHA256 and SHA512 support. */
509#undef USE_SHA2
510
511/* Enable extensions on AIX 3, Interix. */
512#ifndef _ALL_SOURCE
513# undef _ALL_SOURCE
514#endif
515/* Enable GNU extensions on systems that have them. */
516#ifndef _GNU_SOURCE
517# undef _GNU_SOURCE
518#endif
519/* Enable threading extensions on Solaris. */
520#ifndef _POSIX_PTHREAD_SEMANTICS
521# undef _POSIX_PTHREAD_SEMANTICS
522#endif
523/* Enable extensions on HP NonStop. */
524#ifndef _TANDEM_SOURCE
525# undef _TANDEM_SOURCE
526#endif
527/* Enable general extensions on Solaris. */
528#ifndef __EXTENSIONS__
529# undef __EXTENSIONS__
530#endif
531
532
533/* Whether the windows socket API is used */
534#undef USE_WINSOCK
535
536/* the version of the windows API enabled */
537#undef WINVER
538
539/* Define if you want Python module. */
540#undef WITH_PYTHONMODULE
541
542/* Define if you want PyUnbound. */
543#undef WITH_PYUNBOUND
544
545/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
546 `char[]'. */
547#undef YYTEXT_POINTER
548
549/* Enable large inode numbers on Mac OS X 10.5. */
550#ifndef _DARWIN_USE_64_BIT_INODE
551# define _DARWIN_USE_64_BIT_INODE 1
552#endif
553
554/* Number of bits in a file offset, on hosts where this is settable. */
555#undef _FILE_OFFSET_BITS
556
557/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
558#undef _LARGEFILE_SOURCE
559
560/* Define for large files, on AIX-style hosts. */
561#undef _LARGE_FILES
562
563/* Define to 1 if on MINIX. */
564#undef _MINIX
565
566/* Enable for compile on Minix */
567#undef _NETBSD_SOURCE
568
569/* Define to 2 if the system does not provide POSIX.1 features except with
570 this defined. */
571#undef _POSIX_1_SOURCE
572
573/* Define to 1 if you need to in order for `stat' and other things to work. */
574#undef _POSIX_SOURCE
575
576/* Define to empty if `const' does not conform to ANSI C. */
577#undef const
578
579/* Define to `int' if <sys/types.h> doesn't define. */
580#undef gid_t
581
582/* in_addr_t */
583#undef in_addr_t
584
585/* in_port_t */
586#undef in_port_t
587
588/* Define to `__inline__' or `__inline' if that's what the C compiler
589 calls it, or to nothing if 'inline' is not supported under any name. */
590#ifndef __cplusplus
591#undef inline
592#endif
593
594/* Define to `short' if <sys/types.h> does not define. */
595#undef int16_t
596
597/* Define to `int' if <sys/types.h> does not define. */
598#undef int32_t
599
600/* Define to `long long' if <sys/types.h> does not define. */
601#undef int64_t
602
603/* Define to `signed char' if <sys/types.h> does not define. */
604#undef int8_t
605
606/* Define if replacement function should be used. */
607#undef malloc
608
609/* Define to `long int' if <sys/types.h> does not define. */
610#undef off_t
611
612/* Define to `int' if <sys/types.h> does not define. */
613#undef pid_t
614
615/* Define to 'int' if not defined */
616#undef rlim_t
617
618/* Define to `unsigned int' if <sys/types.h> does not define. */
619#undef size_t
620
621/* Define to 'int' if not defined */
622#undef socklen_t
623
624/* Define to `int' if <sys/types.h> does not define. */
625#undef ssize_t
626
627/* Define to 'unsigned char if not defined */
628#undef u_char
629
630/* Define to `int' if <sys/types.h> doesn't define. */
631#undef uid_t
632
633/* Define to `unsigned short' if <sys/types.h> does not define. */
634#undef uint16_t
635
636/* Define to `unsigned int' if <sys/types.h> does not define. */
637#undef uint32_t
638
639/* Define to `unsigned long long' if <sys/types.h> does not define. */
640#undef uint64_t
641
642/* Define to `unsigned char' if <sys/types.h> does not define. */
643#undef uint8_t
644
645/* Define as `fork' if `vfork' does not work. */
646#undef vfork
647
648#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
649#define _GNU_SOURCE 1
650#endif
651
652#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
653#define _BSD_SOURCE 1
654#endif
655
656#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
657#define __EXTENSIONS__ 1
658#endif
659
660#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
661#define _POSIX_C_SOURCE 200112
662#endif
663
664#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
665#define _XOPEN_SOURCE 600
666#endif
667
668#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
669#define _XOPEN_SOURCE_EXTENDED 1
670#endif
671
672#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
673#define _ALL_SOURCE 1
674#endif
675
676#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
677#define _LARGEFILE_SOURCE 1
678#endif
679
680
681
682
683#ifndef UNBOUND_DEBUG
684# define NDEBUG
685#endif
686
687/** Use small-ldns codebase */
688#define USE_SLDNS 1
689#ifdef HAVE_SSL
690# define LDNS_BUILD_CONFIG_HAVE_SSL 1
691#endif
692
693#include <stdio.h>
694#include <string.h>
695#include <unistd.h>
696#include <assert.h>
697
698#if STDC_HEADERS
699#include <stdlib.h>
700#include <stddef.h>
701#endif
702
703#ifdef HAVE_STDARG_H
704#include <stdarg.h>
705#endif
706
707#ifdef HAVE_STDINT_H
708#include <stdint.h>
709#endif
710
711#include <errno.h>
712
713#if HAVE_SYS_PARAM_H
714#include <sys/param.h>
715#endif
716
717#ifdef HAVE_SYS_SOCKET_H
718#include <sys/socket.h>
719#endif
720
721#ifdef HAVE_SYS_UIO_H
722#include <sys/uio.h>
723#endif
724
725#ifdef HAVE_NETINET_IN_H
726#include <netinet/in.h>
727#endif
728
729#ifdef HAVE_ARPA_INET_H
730#include <arpa/inet.h>
731#endif
732
733#ifdef HAVE_WINSOCK2_H
734#include <winsock2.h>
735#endif
736
737#ifdef HAVE_WS2TCPIP_H
738#include <ws2tcpip.h>
739#endif
740
741#ifndef USE_WINSOCK
742#define ARG_LL "%ll"
743#else
744#define ARG_LL "%I64"
745#endif
746
747
748
749#ifdef HAVE_ATTR_FORMAT
750# define ATTR_FORMAT(archetype, string_index, first_to_check) \
751 __attribute__ ((format (archetype, string_index, first_to_check)))
752#else /* !HAVE_ATTR_FORMAT */
753# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
754#endif /* !HAVE_ATTR_FORMAT */
755
756
757#if defined(DOXYGEN)
758# define ATTR_UNUSED(x) x
759#elif defined(__cplusplus)
760# define ATTR_UNUSED(x)
761#elif defined(HAVE_ATTR_UNUSED)
762# define ATTR_UNUSED(x) x __attribute__((unused))
763#else /* !HAVE_ATTR_UNUSED */
764# define ATTR_UNUSED(x) x
765#endif /* !HAVE_ATTR_UNUSED */
766
767
768#ifndef HAVE_FSEEKO
769#define fseeko fseek
770#define ftello ftell
771#endif /* HAVE_FSEEKO */
772
773
774#ifndef MAXHOSTNAMELEN
775#define MAXHOSTNAMELEN 256
776#endif
777
778
779#ifndef HAVE_SNPRINTF
780#define snprintf snprintf_unbound
781#define vsnprintf vsnprintf_unbound
782#include <stdarg.h>
783int snprintf (char *str, size_t count, const char *fmt, ...);
784int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
785#endif /* HAVE_SNPRINTF */
786
787
788#ifndef HAVE_INET_PTON
789#define inet_pton inet_pton_unbound
790int inet_pton(int af, const char* src, void* dst);
791#endif /* HAVE_INET_PTON */
792
793
794#ifndef HAVE_INET_NTOP
795#define inet_ntop inet_ntop_unbound
796const char *inet_ntop(int af, const void *src, char *dst, size_t size);
797#endif
798
799
800#ifndef HAVE_INET_ATON
801#define inet_aton inet_aton_unbound
802int inet_aton(const char *cp, struct in_addr *addr);
803#endif
804
805
806#ifndef HAVE_MEMMOVE
807#define memmove memmove_unbound
808void *memmove(void *dest, const void *src, size_t n);
809#endif
810
811
812#ifndef HAVE_STRLCAT
813#define strlcat strlcat_unbound
814size_t strlcat(char *dst, const char *src, size_t siz);
815#endif
816
817
818#ifndef HAVE_STRLCPY
819#define strlcpy strlcpy_unbound
820size_t strlcpy(char *dst, const char *src, size_t siz);
821#endif
822
823
824#ifndef HAVE_GMTIME_R
825#define gmtime_r gmtime_r_unbound
826struct tm *gmtime_r(const time_t *timep, struct tm *result);
827#endif
828
829
830#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
831#define sleep(x) Sleep((x)*1000) /* on win32 */
832#endif /* HAVE_SLEEP */
833
834
835#ifndef HAVE_USLEEP
836#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
837#endif /* HAVE_USLEEP */
838
839
840#ifndef HAVE_RANDOM
841#define random rand /* on win32, for tests only (bad random) */
842#endif /* HAVE_RANDOM */
843
844
845#ifndef HAVE_SRANDOM
846#define srandom(x) srand(x) /* on win32, for tests only (bad random) */
847#endif /* HAVE_SRANDOM */
848
849
850/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
851#ifdef HAVE_WINSOCK2_H
852#define FD_SET_T (u_int)
853#else
854#define FD_SET_T
855#endif
856
857
858#ifndef IPV6_MIN_MTU
859#define IPV6_MIN_MTU 1280
860#endif /* IPV6_MIN_MTU */
861
862
863#ifdef MEMCMP_IS_BROKEN
864#include "compat/memcmp.h"
865#define memcmp memcmp_unbound
866int memcmp(const void *x, const void *y, size_t n);
867#endif
868
869
870
871#ifndef HAVE_CTIME_R
872#define ctime_r unbound_ctime_r
873char *ctime_r(const time_t *timep, char *buf);
874#endif
875
876#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
877#define strptime unbound_strptime
878struct tm;
879char *strptime(const char *s, const char *format, struct tm *tm);
880#endif
881
544/* Define this to enable ECDSA support. */
545#undef USE_ECDSA
546
547/* Define this to enable an EVP workaround for older openssl */
548#undef USE_ECDSA_EVP_WORKAROUND
549
550/* Define this to enable GOST support. */
551#undef USE_GOST
552
553/* Define if you want to use internal select based events */
554#undef USE_MINI_EVENT
555
556/* Define this to enable SHA256 and SHA512 support. */
557#undef USE_SHA2
558
559/* Enable extensions on AIX 3, Interix. */
560#ifndef _ALL_SOURCE
561# undef _ALL_SOURCE
562#endif
563/* Enable GNU extensions on systems that have them. */
564#ifndef _GNU_SOURCE
565# undef _GNU_SOURCE
566#endif
567/* Enable threading extensions on Solaris. */
568#ifndef _POSIX_PTHREAD_SEMANTICS
569# undef _POSIX_PTHREAD_SEMANTICS
570#endif
571/* Enable extensions on HP NonStop. */
572#ifndef _TANDEM_SOURCE
573# undef _TANDEM_SOURCE
574#endif
575/* Enable general extensions on Solaris. */
576#ifndef __EXTENSIONS__
577# undef __EXTENSIONS__
578#endif
579
580
581/* Whether the windows socket API is used */
582#undef USE_WINSOCK
583
584/* the version of the windows API enabled */
585#undef WINVER
586
587/* Define if you want Python module. */
588#undef WITH_PYTHONMODULE
589
590/* Define if you want PyUnbound. */
591#undef WITH_PYUNBOUND
592
593/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
594 `char[]'. */
595#undef YYTEXT_POINTER
596
597/* Enable large inode numbers on Mac OS X 10.5. */
598#ifndef _DARWIN_USE_64_BIT_INODE
599# define _DARWIN_USE_64_BIT_INODE 1
600#endif
601
602/* Number of bits in a file offset, on hosts where this is settable. */
603#undef _FILE_OFFSET_BITS
604
605/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
606#undef _LARGEFILE_SOURCE
607
608/* Define for large files, on AIX-style hosts. */
609#undef _LARGE_FILES
610
611/* Define to 1 if on MINIX. */
612#undef _MINIX
613
614/* Enable for compile on Minix */
615#undef _NETBSD_SOURCE
616
617/* Define to 2 if the system does not provide POSIX.1 features except with
618 this defined. */
619#undef _POSIX_1_SOURCE
620
621/* Define to 1 if you need to in order for `stat' and other things to work. */
622#undef _POSIX_SOURCE
623
624/* Define to empty if `const' does not conform to ANSI C. */
625#undef const
626
627/* Define to `int' if <sys/types.h> doesn't define. */
628#undef gid_t
629
630/* in_addr_t */
631#undef in_addr_t
632
633/* in_port_t */
634#undef in_port_t
635
636/* Define to `__inline__' or `__inline' if that's what the C compiler
637 calls it, or to nothing if 'inline' is not supported under any name. */
638#ifndef __cplusplus
639#undef inline
640#endif
641
642/* Define to `short' if <sys/types.h> does not define. */
643#undef int16_t
644
645/* Define to `int' if <sys/types.h> does not define. */
646#undef int32_t
647
648/* Define to `long long' if <sys/types.h> does not define. */
649#undef int64_t
650
651/* Define to `signed char' if <sys/types.h> does not define. */
652#undef int8_t
653
654/* Define if replacement function should be used. */
655#undef malloc
656
657/* Define to `long int' if <sys/types.h> does not define. */
658#undef off_t
659
660/* Define to `int' if <sys/types.h> does not define. */
661#undef pid_t
662
663/* Define to 'int' if not defined */
664#undef rlim_t
665
666/* Define to `unsigned int' if <sys/types.h> does not define. */
667#undef size_t
668
669/* Define to 'int' if not defined */
670#undef socklen_t
671
672/* Define to `int' if <sys/types.h> does not define. */
673#undef ssize_t
674
675/* Define to 'unsigned char if not defined */
676#undef u_char
677
678/* Define to `int' if <sys/types.h> doesn't define. */
679#undef uid_t
680
681/* Define to `unsigned short' if <sys/types.h> does not define. */
682#undef uint16_t
683
684/* Define to `unsigned int' if <sys/types.h> does not define. */
685#undef uint32_t
686
687/* Define to `unsigned long long' if <sys/types.h> does not define. */
688#undef uint64_t
689
690/* Define to `unsigned char' if <sys/types.h> does not define. */
691#undef uint8_t
692
693/* Define as `fork' if `vfork' does not work. */
694#undef vfork
695
696#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
697#define _GNU_SOURCE 1
698#endif
699
700#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
701#define _BSD_SOURCE 1
702#endif
703
704#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
705#define __EXTENSIONS__ 1
706#endif
707
708#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
709#define _POSIX_C_SOURCE 200112
710#endif
711
712#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
713#define _XOPEN_SOURCE 600
714#endif
715
716#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
717#define _XOPEN_SOURCE_EXTENDED 1
718#endif
719
720#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
721#define _ALL_SOURCE 1
722#endif
723
724#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
725#define _LARGEFILE_SOURCE 1
726#endif
727
728
729
730
731#ifndef UNBOUND_DEBUG
732# define NDEBUG
733#endif
734
735/** Use small-ldns codebase */
736#define USE_SLDNS 1
737#ifdef HAVE_SSL
738# define LDNS_BUILD_CONFIG_HAVE_SSL 1
739#endif
740
741#include <stdio.h>
742#include <string.h>
743#include <unistd.h>
744#include <assert.h>
745
746#if STDC_HEADERS
747#include <stdlib.h>
748#include <stddef.h>
749#endif
750
751#ifdef HAVE_STDARG_H
752#include <stdarg.h>
753#endif
754
755#ifdef HAVE_STDINT_H
756#include <stdint.h>
757#endif
758
759#include <errno.h>
760
761#if HAVE_SYS_PARAM_H
762#include <sys/param.h>
763#endif
764
765#ifdef HAVE_SYS_SOCKET_H
766#include <sys/socket.h>
767#endif
768
769#ifdef HAVE_SYS_UIO_H
770#include <sys/uio.h>
771#endif
772
773#ifdef HAVE_NETINET_IN_H
774#include <netinet/in.h>
775#endif
776
777#ifdef HAVE_ARPA_INET_H
778#include <arpa/inet.h>
779#endif
780
781#ifdef HAVE_WINSOCK2_H
782#include <winsock2.h>
783#endif
784
785#ifdef HAVE_WS2TCPIP_H
786#include <ws2tcpip.h>
787#endif
788
789#ifndef USE_WINSOCK
790#define ARG_LL "%ll"
791#else
792#define ARG_LL "%I64"
793#endif
794
795
796
797#ifdef HAVE_ATTR_FORMAT
798# define ATTR_FORMAT(archetype, string_index, first_to_check) \
799 __attribute__ ((format (archetype, string_index, first_to_check)))
800#else /* !HAVE_ATTR_FORMAT */
801# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
802#endif /* !HAVE_ATTR_FORMAT */
803
804
805#if defined(DOXYGEN)
806# define ATTR_UNUSED(x) x
807#elif defined(__cplusplus)
808# define ATTR_UNUSED(x)
809#elif defined(HAVE_ATTR_UNUSED)
810# define ATTR_UNUSED(x) x __attribute__((unused))
811#else /* !HAVE_ATTR_UNUSED */
812# define ATTR_UNUSED(x) x
813#endif /* !HAVE_ATTR_UNUSED */
814
815
816#ifndef HAVE_FSEEKO
817#define fseeko fseek
818#define ftello ftell
819#endif /* HAVE_FSEEKO */
820
821
822#ifndef MAXHOSTNAMELEN
823#define MAXHOSTNAMELEN 256
824#endif
825
826
827#ifndef HAVE_SNPRINTF
828#define snprintf snprintf_unbound
829#define vsnprintf vsnprintf_unbound
830#include <stdarg.h>
831int snprintf (char *str, size_t count, const char *fmt, ...);
832int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
833#endif /* HAVE_SNPRINTF */
834
835
836#ifndef HAVE_INET_PTON
837#define inet_pton inet_pton_unbound
838int inet_pton(int af, const char* src, void* dst);
839#endif /* HAVE_INET_PTON */
840
841
842#ifndef HAVE_INET_NTOP
843#define inet_ntop inet_ntop_unbound
844const char *inet_ntop(int af, const void *src, char *dst, size_t size);
845#endif
846
847
848#ifndef HAVE_INET_ATON
849#define inet_aton inet_aton_unbound
850int inet_aton(const char *cp, struct in_addr *addr);
851#endif
852
853
854#ifndef HAVE_MEMMOVE
855#define memmove memmove_unbound
856void *memmove(void *dest, const void *src, size_t n);
857#endif
858
859
860#ifndef HAVE_STRLCAT
861#define strlcat strlcat_unbound
862size_t strlcat(char *dst, const char *src, size_t siz);
863#endif
864
865
866#ifndef HAVE_STRLCPY
867#define strlcpy strlcpy_unbound
868size_t strlcpy(char *dst, const char *src, size_t siz);
869#endif
870
871
872#ifndef HAVE_GMTIME_R
873#define gmtime_r gmtime_r_unbound
874struct tm *gmtime_r(const time_t *timep, struct tm *result);
875#endif
876
877
878#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
879#define sleep(x) Sleep((x)*1000) /* on win32 */
880#endif /* HAVE_SLEEP */
881
882
883#ifndef HAVE_USLEEP
884#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
885#endif /* HAVE_USLEEP */
886
887
888#ifndef HAVE_RANDOM
889#define random rand /* on win32, for tests only (bad random) */
890#endif /* HAVE_RANDOM */
891
892
893#ifndef HAVE_SRANDOM
894#define srandom(x) srand(x) /* on win32, for tests only (bad random) */
895#endif /* HAVE_SRANDOM */
896
897
898/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
899#ifdef HAVE_WINSOCK2_H
900#define FD_SET_T (u_int)
901#else
902#define FD_SET_T
903#endif
904
905
906#ifndef IPV6_MIN_MTU
907#define IPV6_MIN_MTU 1280
908#endif /* IPV6_MIN_MTU */
909
910
911#ifdef MEMCMP_IS_BROKEN
912#include "compat/memcmp.h"
913#define memcmp memcmp_unbound
914int memcmp(const void *x, const void *y, size_t n);
915#endif
916
917
918
919#ifndef HAVE_CTIME_R
920#define ctime_r unbound_ctime_r
921char *ctime_r(const time_t *timep, char *buf);
922#endif
923
924#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
925#define strptime unbound_strptime
926struct tm;
927char *strptime(const char *s, const char *format, struct tm *tm);
928#endif
929
930#ifdef HAVE_LIBRESSL
931# if !HAVE_DECL_STRLCPY
932size_t strlcpy(char *dst, const char *src, size_t siz);
933# endif
934# if !HAVE_DECL_STRLCAT
935size_t strlcat(char *dst, const char *src, size_t siz);
936# endif
937# if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
938uint32_t arc4random(void);
939# endif
940# if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
941uint32_t arc4random_uniform(uint32_t upper_bound);
942# endif
943#endif /* HAVE_LIBRESSL */
944#ifndef HAVE_ARC4RANDOM
945void explicit_bzero(void* buf, size_t len);
946int getentropy(void* buf, size_t len);
947uint32_t arc4random(void);
948void arc4random_buf(void* buf, size_t n);
949void _ARC4_LOCK(void);
950void _ARC4_UNLOCK(void);
951#endif
952#ifndef HAVE_ARC4RANDOM_UNIFORM
953uint32_t arc4random_uniform(uint32_t upper_bound);
954#endif
955#ifdef COMPAT_SHA512
956#ifndef SHA512_DIGEST_LENGTH
957#define SHA512_BLOCK_LENGTH 128
958#define SHA512_DIGEST_LENGTH 64
959#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
960typedef struct _SHA512_CTX {
961 uint64_t state[8];
962 uint64_t bitcount[2];
963 uint8_t buffer[SHA512_BLOCK_LENGTH];
964} SHA512_CTX;
965#endif /* SHA512_DIGEST_LENGTH */
966void SHA512_Init(SHA512_CTX*);
967void SHA512_Update(SHA512_CTX*, void*, size_t);
968void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
969unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
970#endif /* COMPAT_SHA512 */
971
972
973
882#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
883 /* using version of libevent that is not threadsafe. */
884# define LIBEVENT_SIGNAL_PROBLEM 1
885#endif
886
887#ifndef CHECKED_INET6
888# define CHECKED_INET6
889# ifdef AF_INET6
890# define INET6
891# else
892# define AF_INET6 28
893# endif
894#endif /* CHECKED_INET6 */
895
896#ifndef HAVE_GETADDRINFO
897struct sockaddr_storage;
898#include "compat/fake-rfc2553.h"
899#endif
900
901#ifdef UNBOUND_ALLOC_STATS
902# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
903# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
904# define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
905# define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
906void *unbound_stat_malloc(size_t size);
907void *unbound_stat_calloc(size_t nmemb, size_t size);
908void unbound_stat_free(void *ptr);
909void *unbound_stat_realloc(void *ptr, size_t size);
910void *unbound_stat_malloc_log(size_t size, const char* file, int line,
911 const char* func);
912void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
913 int line, const char* func);
914void unbound_stat_free_log(void *ptr, const char* file, int line,
915 const char* func);
916void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
917 int line, const char* func);
918#elif defined(UNBOUND_ALLOC_LITE)
919# include "util/alloc.h"
920#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
921
922/** default port for DNS traffic. */
923#define UNBOUND_DNS_PORT 53
924/** default port for unbound control traffic, registered port with IANA,
925 ub-dns-control 8953/tcp unbound dns nameserver control */
926#define UNBOUND_CONTROL_PORT 8953
927/** the version of unbound-control that this software implements */
928#define UNBOUND_CONTROL_VERSION 1
929
930
974#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
975 /* using version of libevent that is not threadsafe. */
976# define LIBEVENT_SIGNAL_PROBLEM 1
977#endif
978
979#ifndef CHECKED_INET6
980# define CHECKED_INET6
981# ifdef AF_INET6
982# define INET6
983# else
984# define AF_INET6 28
985# endif
986#endif /* CHECKED_INET6 */
987
988#ifndef HAVE_GETADDRINFO
989struct sockaddr_storage;
990#include "compat/fake-rfc2553.h"
991#endif
992
993#ifdef UNBOUND_ALLOC_STATS
994# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
995# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
996# define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
997# define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
998void *unbound_stat_malloc(size_t size);
999void *unbound_stat_calloc(size_t nmemb, size_t size);
1000void unbound_stat_free(void *ptr);
1001void *unbound_stat_realloc(void *ptr, size_t size);
1002void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1003 const char* func);
1004void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1005 int line, const char* func);
1006void unbound_stat_free_log(void *ptr, const char* file, int line,
1007 const char* func);
1008void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1009 int line, const char* func);
1010#elif defined(UNBOUND_ALLOC_LITE)
1011# include "util/alloc.h"
1012#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1013
1014/** default port for DNS traffic. */
1015#define UNBOUND_DNS_PORT 53
1016/** default port for unbound control traffic, registered port with IANA,
1017 ub-dns-control 8953/tcp unbound dns nameserver control */
1018#define UNBOUND_CONTROL_PORT 8953
1019/** the version of unbound-control that this software implements */
1020#define UNBOUND_CONTROL_VERSION 1
1021
1022