xref: /netbsd-src/external/bsd/unbound/include/config.h (revision d16b7486a53dcb8072b60ec6fcb4373a2d0c27b7)
1 /* config.h.  Generated from config.h.in by configure.  */
2 /* config.h.in.  Generated from configure.ac by autoheader.  */
3 
4 /* apply the noreturn attribute to a function that exits the program */
5 #define ATTR_NORETURN __attribute__((__noreturn__))
6 
7 /* apply the weak attribute to a symbol */
8 #define ATTR_WEAK __attribute__((__weak__))
9 
10 /* Directory to chroot to */
11 #define CHROOT_DIR "/var/chroot/unbound"
12 
13 /* Define this to enable client subnet option. */
14 /* #undef CLIENT_SUBNET */
15 
16 /* Do sha512 definitions in config.h */
17 /* #undef COMPAT_SHA512 */
18 
19 /* Command line arguments used with configure */
20 #define CONFCMDLINE ""
21 
22 /* Pathname to the Unbound configuration file */
23 #define CONFIGFILE CHROOT_DIR "/etc/unbound/unbound.conf"
24 
25 /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
26    */
27 /* #undef DARWIN_BROKEN_SETREUID */
28 
29 /* Whether daemon is deprecated */
30 /* #undef DEPRECATED_DAEMON */
31 
32 /* Deprecate RSA 1024 bit length, makes that an unsupported key */
33 /* #undef DEPRECATE_RSA_1024 */
34 
35 /* Define this to enable kernel based UDP source port randomization. */
36 /* #undef DISABLE_EXPLICIT_PORT_RANDOMISATION */
37 
38 /* default dnstap socket path */
39 /* #undef DNSTAP_SOCKET_PATH */
40 
41 /* Define if you want to use debug lock checking (slow). */
42 /* #undef ENABLE_LOCK_CHECKS */
43 
44 /* Define this if you enabled-allsymbols from libunbound to link binaries to
45    it for smaller install size, but the libunbound export table is polluted by
46    internal symbols */
47 /* #undef EXPORT_ALL_SYMBOLS */
48 
49 /* Define to 1 if you have the `accept4' function. */
50 #define HAVE_ACCEPT4 1
51 
52 /* Define to 1 if you have the `arc4random' function. */
53 #define HAVE_ARC4RANDOM 1
54 
55 /* Define to 1 if you have the `arc4random_uniform' function. */
56 #define HAVE_ARC4RANDOM_UNIFORM 1
57 
58 /* Define to 1 if you have the <arpa/inet.h> header file. */
59 #define HAVE_ARPA_INET_H 1
60 
61 /* Whether the C compiler accepts the "format" attribute */
62 #define HAVE_ATTR_FORMAT 1
63 
64 /* Whether the C compiler accepts the "noreturn" attribute */
65 #define HAVE_ATTR_NORETURN 1
66 
67 /* Whether the C compiler accepts the "unused" attribute */
68 #define HAVE_ATTR_UNUSED 1
69 
70 /* Whether the C compiler accepts the "weak" attribute */
71 #define HAVE_ATTR_WEAK 1
72 
73 /* If we have be64toh */
74 #define HAVE_BE64TOH 1
75 
76 /* Define to 1 if you have the `BIO_set_callback_ex' function. */
77 #define HAVE_BIO_SET_CALLBACK_EX 1
78 
79 /* Define to 1 if you have the <bsd/stdlib.h> header file. */
80 /* #undef HAVE_BSD_STDLIB_H */
81 
82 /* Define to 1 if you have the <bsd/string.h> header file. */
83 /* #undef HAVE_BSD_STRING_H */
84 
85 /* Define to 1 if you have the `chown' function. */
86 #define HAVE_CHOWN 1
87 
88 /* Define to 1 if you have the `chroot' function. */
89 #define HAVE_CHROOT 1
90 
91 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
92 /* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */
93 
94 /* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */
95 /* #undef HAVE_CRYPTO_THREADID_SET_CALLBACK */
96 
97 /* Define to 1 if you have the `ctime_r' function. */
98 #define HAVE_CTIME_R 1
99 
100 /* Define to 1 if you have the `daemon' function. */
101 #define HAVE_DAEMON 1
102 
103 /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
104    don't. */
105 /* #undef HAVE_DECL_ARC4RANDOM */
106 
107 /* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
108    if you don't. */
109 /* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */
110 
111 /* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if
112    you don't. */
113 /* #undef HAVE_DECL_EVSIGNAL_ASSIGN */
114 
115 /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
116    don't. */
117 #define HAVE_DECL_INET_NTOP 1
118 
119 /* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
120    don't. */
121 #define HAVE_DECL_INET_PTON 1
122 
123 /* Define to 1 if you have the declaration of `nghttp2_session_server_new',
124    and to 0 if you don't. */
125 /* #undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW */
126 
127 /* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
128    don't. */
129 #define HAVE_DECL_NID_ED25519 1
130 
131 /* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you
132    don't. */
133 #define HAVE_DECL_NID_ED448 1
134 
135 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
136    don't. */
137 #define HAVE_DECL_NID_SECP384R1 1
138 
139 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
140    if you don't. */
141 #define HAVE_DECL_NID_X9_62_PRIME256V1 1
142 
143 /* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
144    don't. */
145 #define HAVE_DECL_REALLOCARRAY 0
146 
147 /* Define to 1 if you have the declaration of `redisConnect', and to 0 if you
148    don't. */
149 /* #undef HAVE_DECL_REDISCONNECT */
150 
151 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
152    if you don't. */
153 #define HAVE_DECL_SK_SSL_COMP_POP_FREE 1
154 
155 /* Define to 1 if you have the declaration of
156    `SSL_COMP_get_compression_methods', and to 0 if you don't. */
157 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1
158 
159 /* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
160    0 if you don't. */
161 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 1
162 
163 /* Define to 1 if you have the declaration of `strlcat', and to 0 if you
164    don't. */
165 /* #undef HAVE_DECL_STRLCAT */
166 
167 /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
168    don't. */
169 /* #undef HAVE_DECL_STRLCPY */
170 
171 /* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
172    you don't. */
173 #define HAVE_DECL_XML_STOPPARSER 1
174 
175 /* Define to 1 if you have the <dlfcn.h> header file. */
176 #define HAVE_DLFCN_H 1
177 
178 /* Define to 1 if you have the `DSA_SIG_set0' function. */
179 #define HAVE_DSA_SIG_SET0 1
180 
181 /* Define to 1 if you have the <endian.h> header file. */
182 #define HAVE_ENDIAN_H 1
183 
184 /* Define to 1 if you have the `endprotoent' function. */
185 #define HAVE_ENDPROTOENT 1
186 
187 /* Define to 1 if you have the `endpwent' function. */
188 #define HAVE_ENDPWENT 1
189 
190 /* Define to 1 if you have the `endservent' function. */
191 #define HAVE_ENDSERVENT 1
192 
193 /* Define to 1 if you have the `ENGINE_cleanup' function. */
194 /* #undef HAVE_ENGINE_CLEANUP */
195 
196 /* Define to 1 if you have the `ERR_free_strings' function. */
197 /* #undef HAVE_ERR_FREE_STRINGS */
198 
199 /* Define to 1 if you have the `ERR_load_crypto_strings' function. */
200 /* #undef HAVE_ERR_LOAD_CRYPTO_STRINGS */
201 
202 /* Define to 1 if you have the `event_assign' function. */
203 #define HAVE_EVENT_ASSIGN 1
204 
205 /* Define to 1 if you have the `event_base_free' function. */
206 #define HAVE_EVENT_BASE_FREE 1
207 
208 /* Define to 1 if you have the `event_base_get_method' function. */
209 #define HAVE_EVENT_BASE_GET_METHOD 1
210 
211 /* Define to 1 if you have the `event_base_new' function. */
212 #define HAVE_EVENT_BASE_NEW 1
213 
214 /* Define to 1 if you have the `event_base_once' function. */
215 #define HAVE_EVENT_BASE_ONCE 1
216 
217 /* Define to 1 if you have the <event.h> header file. */
218 #define HAVE_EVENT_H 1
219 
220 /* Define to 1 if you have the `EVP_aes_256_cbc' function. */
221 #define HAVE_EVP_AES_256_CBC 1
222 
223 /* Define to 1 if you have the `EVP_cleanup' function. */
224 /* #undef HAVE_EVP_CLEANUP */
225 
226 /* Define to 1 if you have the `EVP_default_properties_is_fips_enabled'
227    function. */
228 /* #undef HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED */
229 
230 /* Define to 1 if you have the `EVP_DigestVerify' function. */
231 #define HAVE_EVP_DIGESTVERIFY 1
232 
233 /* Define to 1 if you have the `EVP_dss1' function. */
234 /* #undef HAVE_EVP_DSS1 */
235 
236 /* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
237 #define HAVE_EVP_ENCRYPTINIT_EX 1
238 
239 /* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */
240 /* #undef HAVE_EVP_MAC_CTX_SET_PARAMS */
241 
242 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
243 #define HAVE_EVP_MD_CTX_NEW 1
244 
245 /* Define to 1 if you have the `EVP_sha1' function. */
246 #define HAVE_EVP_SHA1 1
247 
248 /* Define to 1 if you have the `EVP_sha256' function. */
249 #define HAVE_EVP_SHA256 1
250 
251 /* Define to 1 if you have the `EVP_sha512' function. */
252 #define HAVE_EVP_SHA512 1
253 
254 /* Define to 1 if you have the `ev_default_loop' function. */
255 /* #undef HAVE_EV_DEFAULT_LOOP */
256 
257 /* Define to 1 if you have the `ev_loop' function. */
258 /* #undef HAVE_EV_LOOP */
259 
260 /* Define to 1 if you have the <expat.h> header file. */
261 #define HAVE_EXPAT_H 1
262 
263 /* Define to 1 if you have the `explicit_bzero' function. */
264 /* #undef HAVE_EXPLICIT_BZERO */
265 
266 /* Define to 1 if you have the `fcntl' function. */
267 #define HAVE_FCNTL 1
268 
269 /* Define to 1 if you have the `FIPS_mode' function. */
270 #define HAVE_FIPS_MODE 1
271 
272 /* Define to 1 if you have the `fork' function. */
273 #define HAVE_FORK 1
274 
275 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
276 #define HAVE_FSEEKO 1
277 
278 /* Define to 1 if you have the `fsync' function. */
279 #define HAVE_FSYNC 1
280 
281 /* Whether getaddrinfo is available */
282 #define HAVE_GETADDRINFO 1
283 
284 /* Define to 1 if you have the `getauxval' function. */
285 /* #undef HAVE_GETAUXVAL */
286 
287 /* Define to 1 if you have the `getentropy' function. */
288 /* #undef HAVE_GETENTROPY */
289 
290 /* Define to 1 if you have the `getifaddrs' function. */
291 #define HAVE_GETIFADDRS 1
292 
293 /* Define to 1 if you have the <getopt.h> header file. */
294 #define HAVE_GETOPT_H 1
295 
296 /* Define to 1 if you have the `getpwnam' function. */
297 #define HAVE_GETPWNAM 1
298 
299 /* Define to 1 if you have the `getrlimit' function. */
300 #define HAVE_GETRLIMIT 1
301 
302 /* Define to 1 if you have the `glob' function. */
303 #define HAVE_GLOB 1
304 
305 /* Define to 1 if you have the <glob.h> header file. */
306 #define HAVE_GLOB_H 1
307 
308 /* Define to 1 if you have the `gmtime_r' function. */
309 #define HAVE_GMTIME_R 1
310 
311 /* Define to 1 if you have the <grp.h> header file. */
312 #define HAVE_GRP_H 1
313 
314 /* Define to 1 if you have the <hiredis/hiredis.h> header file. */
315 /* #undef HAVE_HIREDIS_HIREDIS_H */
316 
317 /* Define to 1 if you have the `HMAC_Init_ex' function. */
318 #define HAVE_HMAC_INIT_EX 1
319 
320 /* If we have htobe64 */
321 #define HAVE_HTOBE64 1
322 
323 /* Define to 1 if you have the <ifaddrs.h> header file. */
324 #define HAVE_IFADDRS_H 1
325 
326 /* Define to 1 if you have the `if_nametoindex' function. */
327 #define HAVE_IF_NAMETOINDEX 1
328 
329 /* Define to 1 if you have the `inet_aton' function. */
330 #define HAVE_INET_ATON 1
331 
332 /* Define to 1 if you have the `inet_ntop' function. */
333 #define HAVE_INET_NTOP 1
334 
335 /* Define to 1 if you have the `inet_pton' function. */
336 #define HAVE_INET_PTON 1
337 
338 /* Define to 1 if you have the `initgroups' function. */
339 #define HAVE_INITGROUPS 1
340 
341 /* Define to 1 if you have the <inttypes.h> header file. */
342 #define HAVE_INTTYPES_H 1
343 
344 /* if the function 'ioctlsocket' is available */
345 /* #undef HAVE_IOCTLSOCKET */
346 
347 /* Define to 1 if you have the <iphlpapi.h> header file. */
348 /* #undef HAVE_IPHLPAPI_H */
349 
350 /* Define to 1 if you have the `isblank' function. */
351 #define HAVE_ISBLANK 1
352 
353 /* Define to 1 if you have the `kill' function. */
354 #define HAVE_KILL 1
355 
356 /* Use portable libbsd functions */
357 /* #undef HAVE_LIBBSD */
358 
359 /* Define to 1 if you have the <libkern/OSByteOrder.h> header file. */
360 /* #undef HAVE_LIBKERN_OSBYTEORDER_H */
361 
362 /* Define if we have LibreSSL */
363 /* #undef HAVE_LIBRESSL */
364 
365 /* Define to 1 if you have the `localtime_r' function. */
366 #define HAVE_LOCALTIME_R 1
367 
368 /* Define to 1 if you have the <login_cap.h> header file. */
369 #define HAVE_LOGIN_CAP_H 1
370 
371 /* If have GNU libc compatible malloc */
372 #define HAVE_MALLOC 1
373 
374 /* Define to 1 if you have the `memmove' function. */
375 #define HAVE_MEMMOVE 1
376 
377 /* Define to 1 if you have the <memory.h> header file. */
378 #define HAVE_MEMORY_H 1
379 
380 /* Define to 1 if you have the <netdb.h> header file. */
381 #define HAVE_NETDB_H 1
382 
383 /* Define to 1 if you have the <netinet/in.h> header file. */
384 #define HAVE_NETINET_IN_H 1
385 
386 /* Define to 1 if you have the <netinet/tcp.h> header file. */
387 #define HAVE_NETINET_TCP_H 1
388 
389 /* Define to 1 if you have the <netioapi.h> header file. */
390 /* #undef HAVE_NETIOAPI_H */
391 
392 /* Use libnettle for crypto */
393 /* #undef HAVE_NETTLE */
394 
395 /* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
396 /* #undef HAVE_NETTLE_DSA_COMPAT_H */
397 
398 /* Define to 1 if you have the <nettle/eddsa.h> header file. */
399 /* #undef HAVE_NETTLE_EDDSA_H */
400 
401 /* Define to 1 if you have the <net/if.h> header file. */
402 #define HAVE_NET_IF_H 1
403 
404 /* Define this to use nghttp2 client. */
405 /* #undef HAVE_NGHTTP2 */
406 
407 /* Define to 1 if you have the <nghttp2/nghttp2.h> header file. */
408 /* #undef HAVE_NGHTTP2_NGHTTP2_H */
409 
410 /* Use libnss for crypto */
411 /* #undef HAVE_NSS */
412 
413 /* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
414 /* #undef HAVE_OPENSSL_ADD_ALL_DIGESTS */
415 
416 /* Define to 1 if you have the <openssl/bn.h> header file. */
417 #define HAVE_OPENSSL_BN_H 1
418 
419 /* Define to 1 if you have the `OPENSSL_config' function. */
420 #define HAVE_OPENSSL_CONFIG 1
421 
422 /* Define to 1 if you have the <openssl/conf.h> header file. */
423 #define HAVE_OPENSSL_CONF_H 1
424 
425 /* Define to 1 if you have the <openssl/core_names.h> header file. */
426 /* #undef HAVE_OPENSSL_CORE_NAMES_H */
427 
428 /* Define to 1 if you have the <openssl/dh.h> header file. */
429 #define HAVE_OPENSSL_DH_H 1
430 
431 /* Define to 1 if you have the <openssl/dsa.h> header file. */
432 #define HAVE_OPENSSL_DSA_H 1
433 
434 /* Define to 1 if you have the <openssl/engine.h> header file. */
435 #define HAVE_OPENSSL_ENGINE_H 1
436 
437 /* Define to 1 if you have the <openssl/err.h> header file. */
438 #define HAVE_OPENSSL_ERR_H 1
439 
440 /* Define to 1 if you have the `OPENSSL_init_crypto' function. */
441 #define HAVE_OPENSSL_INIT_CRYPTO 1
442 
443 /* Define to 1 if you have the `OPENSSL_init_ssl' function. */
444 #define HAVE_OPENSSL_INIT_SSL 1
445 
446 /* Define to 1 if you have the <openssl/param_build.h> header file. */
447 /* #undef HAVE_OPENSSL_PARAM_BUILD_H */
448 
449 /* Define to 1 if you have the <openssl/rand.h> header file. */
450 #define HAVE_OPENSSL_RAND_H 1
451 
452 /* Define to 1 if you have the <openssl/rsa.h> header file. */
453 #define HAVE_OPENSSL_RSA_H 1
454 
455 /* Define to 1 if you have the <openssl/ssl.h> header file. */
456 #define HAVE_OPENSSL_SSL_H 1
457 
458 /* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */
459 /* #undef HAVE_OSSL_PARAM_BLD_NEW */
460 
461 /* Define if you have POSIX threads libraries and header files. */
462 #define HAVE_PTHREAD 1
463 
464 /* Have PTHREAD_PRIO_INHERIT. */
465 #define HAVE_PTHREAD_PRIO_INHERIT 1
466 
467 /* Define to 1 if the system has the type `pthread_rwlock_t'. */
468 #define HAVE_PTHREAD_RWLOCK_T 1
469 
470 /* Define to 1 if the system has the type `pthread_spinlock_t'. */
471 #define HAVE_PTHREAD_SPINLOCK_T 1
472 
473 /* Define to 1 if you have the <pwd.h> header file. */
474 #define HAVE_PWD_H 1
475 
476 /* Define if you have Python libraries and header files. */
477 /* #undef HAVE_PYTHON */
478 
479 /* Define to 1 if you have the `random' function. */
480 #define HAVE_RANDOM 1
481 
482 /* Define to 1 if you have the `RAND_cleanup' function. */
483 /* #undef HAVE_RAND_CLEANUP */
484 
485 /* If we have reallocarray(3) */
486 #define HAVE_REALLOCARRAY 1
487 
488 /* Define to 1 if you have the `recvmsg' function. */
489 #define HAVE_RECVMSG 1
490 
491 /* Define to 1 if you have the `sendmsg' function. */
492 #define HAVE_SENDMSG 1
493 
494 /* Define to 1 if you have the `setregid' function. */
495 #define HAVE_SETREGID 1
496 
497 /* Define to 1 if you have the `setresgid' function. */
498 /* #undef HAVE_SETRESGID */
499 
500 /* Define to 1 if you have the `setresuid' function. */
501 /* #undef HAVE_SETRESUID */
502 
503 /* Define to 1 if you have the `setreuid' function. */
504 #define HAVE_SETREUID 1
505 
506 /* Define to 1 if you have the `setrlimit' function. */
507 #define HAVE_SETRLIMIT 1
508 
509 /* Define to 1 if you have the `setsid' function. */
510 #define HAVE_SETSID 1
511 
512 /* Define to 1 if you have the `setusercontext' function. */
513 #define HAVE_SETUSERCONTEXT 1
514 
515 /* Define to 1 if you have the `SHA512_Update' function. */
516 /* #undef HAVE_SHA512_UPDATE */
517 
518 /* Define to 1 if you have the `shmget' function. */
519 #define HAVE_SHMGET 1
520 
521 /* Define to 1 if you have the `sigprocmask' function. */
522 #define HAVE_SIGPROCMASK 1
523 
524 /* Define to 1 if you have the `sleep' function. */
525 #define HAVE_SLEEP 1
526 
527 /* Define to 1 if you have the `snprintf' function. */
528 #define HAVE_SNPRINTF 1
529 
530 /* Define to 1 if you have the `socketpair' function. */
531 #define HAVE_SOCKETPAIR 1
532 
533 /* Using Solaris threads */
534 /* #undef HAVE_SOLARIS_THREADS */
535 
536 /* Define to 1 if you have the `srandom' function. */
537 #define HAVE_SRANDOM 1
538 
539 /* Define if you have the SSL libraries installed. */
540 #define HAVE_SSL /**/
541 
542 /* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */
543 #define HAVE_SSL_CTX_SET_ALPN_PROTOS 1
544 
545 /* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */
546 #define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1
547 
548 /* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */
549 #define HAVE_SSL_CTX_SET_CIPHERSUITES 1
550 
551 /* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
552 #define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1
553 
554 /* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb'
555    function. */
556 /* #undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB */
557 
558 /* Define to 1 if you have the `SSL_get0_alpn_selected' function. */
559 #define HAVE_SSL_GET0_ALPN_SELECTED 1
560 
561 /* Define to 1 if you have the `SSL_get0_peername' function. */
562 #define HAVE_SSL_GET0_PEERNAME 1
563 
564 /* Define to 1 if you have the `SSL_get1_peer_certificate' function. */
565 /* #undef HAVE_SSL_GET1_PEER_CERTIFICATE */
566 
567 /* Define to 1 if you have the `SSL_set1_host' function. */
568 #define HAVE_SSL_SET1_HOST 1
569 
570 /* Define to 1 if you have the <stdarg.h> header file. */
571 #define HAVE_STDARG_H 1
572 
573 /* Define to 1 if you have the <stdbool.h> header file. */
574 #define HAVE_STDBOOL_H 1
575 
576 /* Define to 1 if you have the <stdint.h> header file. */
577 #define HAVE_STDINT_H 1
578 
579 /* Define to 1 if you have the <stdlib.h> header file. */
580 #define HAVE_STDLIB_H 1
581 
582 /* Define to 1 if you have the `strftime' function. */
583 #define HAVE_STRFTIME 1
584 
585 /* Define to 1 if you have the <strings.h> header file. */
586 #define HAVE_STRINGS_H 1
587 
588 /* Define to 1 if you have the <string.h> header file. */
589 #define HAVE_STRING_H 1
590 
591 /* Define to 1 if you have the `strlcat' function. */
592 #define HAVE_STRLCAT 1
593 
594 /* Define to 1 if you have the `strlcpy' function. */
595 #define HAVE_STRLCPY 1
596 
597 /* Define to 1 if you have the `strptime' function. */
598 #define HAVE_STRPTIME 1
599 
600 /* Define to 1 if you have the `strsep' function. */
601 #define HAVE_STRSEP 1
602 
603 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
604 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
605 
606 /* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
607 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
608 
609 /* Define if you have Swig libraries and header files. */
610 /* #undef HAVE_SWIG */
611 
612 /* Define to 1 if you have the <syslog.h> header file. */
613 #define HAVE_SYSLOG_H 1
614 
615 /* Define to 1 if systemd should be used */
616 /* #undef HAVE_SYSTEMD */
617 
618 /* Define to 1 if you have the <sys/endian.h> header file. */
619 #define HAVE_SYS_ENDIAN_H 1
620 
621 /* Define to 1 if you have the <sys/ipc.h> header file. */
622 #define HAVE_SYS_IPC_H 1
623 
624 /* Define to 1 if you have the <sys/param.h> header file. */
625 #define HAVE_SYS_PARAM_H 1
626 
627 /* Define to 1 if you have the <sys/resource.h> header file. */
628 #define HAVE_SYS_RESOURCE_H 1
629 
630 /* Define to 1 if you have the <sys/select.h> header file. */
631 #define HAVE_SYS_SELECT_H 1
632 
633 /* Define to 1 if you have the <sys/sha2.h> header file. */
634 /* #undef HAVE_SYS_SHA2_H */
635 
636 /* Define to 1 if you have the <sys/shm.h> header file. */
637 #define HAVE_SYS_SHM_H 1
638 
639 /* Define to 1 if you have the <sys/socket.h> header file. */
640 #define HAVE_SYS_SOCKET_H 1
641 
642 /* Define to 1 if you have the <sys/stat.h> header file. */
643 #define HAVE_SYS_STAT_H 1
644 
645 /* Define to 1 if you have the <sys/sysctl.h> header file. */
646 /* #undef HAVE_SYS_SYSCTL_H */
647 
648 /* Define to 1 if you have the <sys/types.h> header file. */
649 #define HAVE_SYS_TYPES_H 1
650 
651 /* Define to 1 if you have the <sys/uio.h> header file. */
652 #define HAVE_SYS_UIO_H 1
653 
654 /* Define to 1 if you have the <sys/un.h> header file. */
655 #define HAVE_SYS_UN_H 1
656 
657 /* Define to 1 if you have the <sys/wait.h> header file. */
658 #define HAVE_SYS_WAIT_H 1
659 
660 /* Define to 1 if you have the <TargetConditionals.h> header file. */
661 /* #undef HAVE_TARGETCONDITIONALS_H */
662 
663 /* Define to 1 if you have the <time.h> header file. */
664 #define HAVE_TIME_H 1
665 
666 /* Define to 1 if you have the `tzset' function. */
667 #define HAVE_TZSET 1
668 
669 /* Define to 1 if you have the <unistd.h> header file. */
670 #define HAVE_UNISTD_H 1
671 
672 /* Define to 1 if you have the `usleep' function. */
673 #define HAVE_USLEEP 1
674 
675 /* Define to 1 if you have the `vfork' function. */
676 #define HAVE_VFORK 1
677 
678 /* Define to 1 if you have the <vfork.h> header file. */
679 /* #undef HAVE_VFORK_H */
680 
681 /* Define to 1 if you have the <windows.h> header file. */
682 /* #undef HAVE_WINDOWS_H */
683 
684 /* Using Windows threads */
685 /* #undef HAVE_WINDOWS_THREADS */
686 
687 /* Define to 1 if you have the <winsock2.h> header file. */
688 /* #undef HAVE_WINSOCK2_H */
689 
690 /* Define to 1 if `fork' works. */
691 #define HAVE_WORKING_FORK 1
692 
693 /* Define to 1 if `vfork' works. */
694 #define HAVE_WORKING_VFORK 1
695 
696 /* Define to 1 if you have the `writev' function. */
697 #define HAVE_WRITEV 1
698 
699 /* Define to 1 if you have the <ws2tcpip.h> header file. */
700 /* #undef HAVE_WS2TCPIP_H */
701 
702 /* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */
703 #define HAVE_X509_VERIFY_PARAM_SET1_HOST 1
704 
705 /* Define to 1 if you have the `_beginthreadex' function. */
706 /* #undef HAVE__BEGINTHREADEX */
707 
708 /* If HMAC_Init_ex() returns void */
709 /* #undef HMAC_INIT_EX_RETURNS_VOID */
710 
711 /* if lex has yylex_destroy */
712 #define LEX_HAS_YYLEX_DESTROY 1
713 
714 /* Define to the sub-directory where libtool stores uninstalled libraries. */
715 #define LT_OBJDIR ".libs/"
716 
717 /* Define to the maximum message length to pass to syslog. */
718 #define MAXSYSLOGMSGLEN 10240
719 
720 /* Define if memcmp() does not compare unsigned bytes */
721 /* #undef MEMCMP_IS_BROKEN */
722 
723 /* Define if mkdir has one argument. */
724 /* #undef MKDIR_HAS_ONE_ARG */
725 
726 /* Define if the network stack does not fully support nonblocking io (causes
727    lower performance). */
728 /* #undef NONBLOCKING_IS_BROKEN */
729 
730 /* Put -D_ALL_SOURCE define in config.h */
731 /* #undef OMITTED__D_ALL_SOURCE */
732 
733 /* Put -D_BSD_SOURCE define in config.h */
734 /* #undef OMITTED__D_BSD_SOURCE */
735 
736 /* Put -D_DEFAULT_SOURCE define in config.h */
737 /* #undef OMITTED__D_DEFAULT_SOURCE */
738 
739 /* Put -D_GNU_SOURCE define in config.h */
740 /* #undef OMITTED__D_GNU_SOURCE */
741 
742 /* Put -D_LARGEFILE_SOURCE=1 define in config.h */
743 /* #undef OMITTED__D_LARGEFILE_SOURCE_1 */
744 
745 /* Put -D_POSIX_C_SOURCE=200112 define in config.h */
746 /* #undef OMITTED__D_POSIX_C_SOURCE_200112 */
747 
748 /* Put -D_XOPEN_SOURCE=600 define in config.h */
749 /* #undef OMITTED__D_XOPEN_SOURCE_600 */
750 
751 /* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
752 /* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */
753 
754 /* Put -D__EXTENSIONS__ define in config.h */
755 /* #undef OMITTED__D__EXTENSIONS__ */
756 
757 /* Define to the address where bug reports for this package should be sent. */
758 #define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues"
759 
760 /* Define to the full name of this package. */
761 #define PACKAGE_NAME "unbound"
762 
763 /* Define to the full name and version of this package. */
764 #define PACKAGE_STRING "unbound 1.16.3"
765 
766 /* Define to the one symbol short name of this package. */
767 #define PACKAGE_TARNAME "unbound"
768 
769 /* Define to the home page for this package. */
770 #define PACKAGE_URL ""
771 
772 /* Define to the version of this package. */
773 #define PACKAGE_VERSION "1.16.3"
774 
775 /* default pidfile location */
776 #define PIDFILE "/var/run/unbound.pid"
777 
778 /* Define to necessary symbol if this constant uses a non-standard name on
779    your system. */
780 /* #undef PTHREAD_CREATE_JOINABLE */
781 
782 /* Return type of signal handlers, but autoconf 2.70 says 'your code may
783    safely assume C89 semantics that RETSIGTYPE is void.' */
784 #define RETSIGTYPE void
785 
786 /* if REUSEPORT is enabled by default */
787 #define REUSEPORT_DEFAULT 0
788 
789 /* default rootkey location */
790 #define ROOT_ANCHOR_FILE CHROOT_DIR "/etc/unbound/root.key"
791 
792 /* default rootcert location */
793 #define ROOT_CERT_FILE CHROOT_DIR "/etc/unbound/icannbundle.pem"
794 
795 /* version number for resource files */
796 #define RSRC_PACKAGE_VERSION 1,16,3,0
797 
798 /* Directory to chdir to */
799 #define RUN_DIR CHROOT_DIR "/etc/unbound"
800 
801 /* Shared data */
802 #define SHARE_DIR CHROOT_DIR "/etc/unbound"
803 
804 /* The size of `size_t', as computed by sizeof. */
805 #define SIZEOF_SIZE_T 8
806 
807 /* The size of `time_t', as computed by sizeof. */
808 #define SIZEOF_TIME_T 8
809 
810 /* define if (v)snprintf does not return length needed, (but length used) */
811 /* #undef SNPRINTF_RET_BROKEN */
812 
813 /* Define to 1 if libsodium supports sodium_set_misuse_handler */
814 /* #undef SODIUM_MISUSE_HANDLER */
815 
816 /* Define to 1 if you have the ANSI C header files. */
817 #define STDC_HEADERS 1
818 
819 /* use default strptime. */
820 #define STRPTIME_WORKS 1
821 
822 /* Use win32 resources and API */
823 /* #undef UB_ON_WINDOWS */
824 
825 /* the SYSLOG_FACILITY to use, default LOG_DAEMON */
826 #define UB_SYSLOG_FACILITY LOG_DAEMON
827 
828 /* default username */
829 #define UB_USERNAME "_unbound"
830 
831 /* use to enable lightweight alloc assertions, for debug use */
832 /* #undef UNBOUND_ALLOC_LITE */
833 
834 /* use malloc not regions, for debug use */
835 /* #undef UNBOUND_ALLOC_NONREGIONAL */
836 
837 /* use statistics for allocs and frees, for debug use */
838 /* #undef UNBOUND_ALLOC_STATS */
839 
840 /* define this to enable debug checks. */
841 /* #undef UNBOUND_DEBUG */
842 
843 /* Define to 1 to use cachedb support */
844 /* #undef USE_CACHEDB */
845 
846 /* Define to 1 to enable dnscrypt support */
847 /* #undef USE_DNSCRYPT */
848 
849 /* Define to 1 to enable dnscrypt with xchacha20 support */
850 /* #undef USE_DNSCRYPT_XCHACHA20 */
851 
852 /* Define to 1 to enable dnstap support */
853 /* #undef USE_DNSTAP */
854 
855 /* Define this to enable DSA support. */
856 /* #undef USE_DSA */
857 
858 /* Define this to enable ECDSA support. */
859 #define USE_ECDSA 1
860 
861 /* Define this to enable an EVP workaround for older openssl */
862 /* #undef USE_ECDSA_EVP_WORKAROUND */
863 
864 /* Define this to enable ED25519 support. */
865 #define USE_ED25519 1
866 
867 /* Define this to enable ED448 support. */
868 #define USE_ED448 1
869 
870 /* Define this to enable GOST support. */
871 /* #undef USE_GOST */
872 
873 /* Define to 1 to use ipsecmod support. */
874 /* #undef USE_IPSECMOD */
875 
876 /* Define to 1 to use ipset support */
877 /* #undef USE_IPSET */
878 
879 /* Define if you enable libevent */
880 #define USE_LIBEVENT 1
881 
882 /* Define if you want to use internal select based events */
883 /* #undef USE_MINI_EVENT */
884 
885 /* Define this to enable client TCP Fast Open. */
886 /* #undef USE_MSG_FASTOPEN */
887 
888 /* Define this to enable client TCP Fast Open. */
889 /* #undef USE_OSX_MSG_FASTOPEN */
890 
891 /* Define this to use hiredis client. */
892 /* #undef USE_REDIS */
893 
894 /* Define this to enable SHA1 support. */
895 #define USE_SHA1 1
896 
897 /* Define this to enable SHA256 and SHA512 support. */
898 #define USE_SHA2 1
899 
900 /* Enable extensions on AIX 3, Interix.  */
901 #ifndef _ALL_SOURCE
902 # define _ALL_SOURCE 1
903 #endif
904 /* Enable GNU extensions on systems that have them.  */
905 #ifndef _GNU_SOURCE
906 # define _GNU_SOURCE 1
907 #endif
908 /* Enable threading extensions on Solaris.  */
909 #ifndef _POSIX_PTHREAD_SEMANTICS
910 # define _POSIX_PTHREAD_SEMANTICS 1
911 #endif
912 /* Enable extensions on HP NonStop.  */
913 #ifndef _TANDEM_SOURCE
914 # define _TANDEM_SOURCE 1
915 #endif
916 /* Enable general extensions on Solaris.  */
917 #ifndef __EXTENSIONS__
918 # define __EXTENSIONS__ 1
919 #endif
920 
921 
922 /* Define this to enable server TCP Fast Open. */
923 /* #undef USE_TCP_FASTOPEN */
924 
925 /* Whether the windows socket API is used */
926 /* #undef USE_WINSOCK */
927 
928 /* the version of the windows API enabled */
929 #define WINVER 0x0502
930 
931 /* Define if you want dynlib module. */
932 /* #undef WITH_DYNLIBMODULE */
933 
934 /* Define if you want Python module. */
935 /* #undef WITH_PYTHONMODULE */
936 
937 /* Define if you want PyUnbound. */
938 /* #undef WITH_PYUNBOUND */
939 
940 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
941    `char[]'. */
942 #define YYTEXT_POINTER 1
943 
944 /* Enable large inode numbers on Mac OS X 10.5.  */
945 #ifndef _DARWIN_USE_64_BIT_INODE
946 # define _DARWIN_USE_64_BIT_INODE 1
947 #endif
948 
949 /* Number of bits in a file offset, on hosts where this is settable. */
950 /* #undef _FILE_OFFSET_BITS */
951 
952 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
953 /* #undef _LARGEFILE_SOURCE */
954 
955 /* Define for large files, on AIX-style hosts. */
956 /* #undef _LARGE_FILES */
957 
958 /* Define to 1 if on MINIX. */
959 /* #undef _MINIX */
960 
961 /* Enable for compile on Minix */
962 /* #undef _NETBSD_SOURCE */
963 
964 /* Define to 2 if the system does not provide POSIX.1 features except with
965    this defined. */
966 /* #undef _POSIX_1_SOURCE */
967 
968 /* defined to use gcc ansi snprintf and sscanf that understands %lld when
969    compiled for windows. */
970 /* #undef __USE_MINGW_ANSI_STDIO */
971 
972 /* Define to 1 if you need to in order for `stat' and other things to work. */
973 /* #undef _POSIX_SOURCE */
974 
975 /* Define to empty if `const' does not conform to ANSI C. */
976 /* #undef const */
977 
978 /* Define to `int' if <sys/types.h> doesn't define. */
979 /* #undef gid_t */
980 
981 /* in_addr_t */
982 /* #undef in_addr_t */
983 
984 /* in_port_t */
985 /* #undef in_port_t */
986 
987 /* Define to `__inline__' or `__inline' if that's what the C compiler
988    calls it, or to nothing if 'inline' is not supported under any name.  */
989 #ifndef __cplusplus
990 /* #undef inline */
991 #endif
992 
993 /* Define to `short' if <sys/types.h> does not define. */
994 /* #undef int16_t */
995 
996 /* Define to `int' if <sys/types.h> does not define. */
997 /* #undef int32_t */
998 
999 /* Define to `long long' if <sys/types.h> does not define. */
1000 /* #undef int64_t */
1001 
1002 /* Define to `signed char' if <sys/types.h> does not define. */
1003 /* #undef int8_t */
1004 
1005 /* Define if replacement function should be used. */
1006 /* #undef malloc */
1007 
1008 /* Define to `long int' if <sys/types.h> does not define. */
1009 /* #undef off_t */
1010 
1011 /* Define to `int' if <sys/types.h> does not define. */
1012 /* #undef pid_t */
1013 
1014 /* Define to 'int' if not defined */
1015 /* #undef rlim_t */
1016 
1017 /* Define to `unsigned int' if <sys/types.h> does not define. */
1018 /* #undef size_t */
1019 
1020 /* Define to 'int' if not defined */
1021 /* #undef socklen_t */
1022 
1023 /* Define to `int' if <sys/types.h> does not define. */
1024 /* #undef ssize_t */
1025 
1026 /* Define to 'unsigned char if not defined */
1027 /* #undef u_char */
1028 
1029 /* Define to `int' if <sys/types.h> doesn't define. */
1030 /* #undef uid_t */
1031 
1032 /* Define to `unsigned short' if <sys/types.h> does not define. */
1033 /* #undef uint16_t */
1034 
1035 /* Define to `unsigned int' if <sys/types.h> does not define. */
1036 /* #undef uint32_t */
1037 
1038 /* Define to `unsigned long long' if <sys/types.h> does not define. */
1039 /* #undef uint64_t */
1040 
1041 /* Define to `unsigned char' if <sys/types.h> does not define. */
1042 /* #undef uint8_t */
1043 
1044 /* Define as `fork' if `vfork' does not work. */
1045 /* #undef vfork */
1046 
1047 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
1048 #define _GNU_SOURCE 1
1049 #endif
1050 
1051 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
1052 #define _BSD_SOURCE 1
1053 #endif
1054 
1055 #if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
1056 #define _DEFAULT_SOURCE 1
1057 #endif
1058 
1059 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
1060 #define __EXTENSIONS__ 1
1061 #endif
1062 
1063 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
1064 #define _POSIX_C_SOURCE 200112
1065 #endif
1066 
1067 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
1068 #define _XOPEN_SOURCE 600
1069 #endif
1070 
1071 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
1072 #define _XOPEN_SOURCE_EXTENDED 1
1073 #endif
1074 
1075 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
1076 #define _ALL_SOURCE 1
1077 #endif
1078 
1079 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
1080 #define _LARGEFILE_SOURCE 1
1081 #endif
1082 
1083 
1084 
1085 
1086 #ifndef _OPENBSD_SOURCE
1087 #define _OPENBSD_SOURCE 1
1088 #endif
1089 
1090 #ifndef UNBOUND_DEBUG
1091 # ifndef NDEBUG
1092 #  define NDEBUG
1093 # endif
1094 #endif
1095 
1096 /** Use small-ldns codebase */
1097 #define USE_SLDNS 1
1098 #ifdef HAVE_SSL
1099 #  define LDNS_BUILD_CONFIG_HAVE_SSL 1
1100 #endif
1101 
1102 #include <stdio.h>
1103 #include <string.h>
1104 #include <unistd.h>
1105 #include <assert.h>
1106 
1107 #if STDC_HEADERS
1108 #include <stdlib.h>
1109 #include <stddef.h>
1110 #endif
1111 
1112 #ifdef HAVE_STDARG_H
1113 #include <stdarg.h>
1114 #endif
1115 
1116 #ifdef HAVE_STDINT_H
1117 #include <stdint.h>
1118 #endif
1119 
1120 #include <errno.h>
1121 
1122 #if HAVE_SYS_PARAM_H
1123 #include <sys/param.h>
1124 #endif
1125 
1126 #ifdef HAVE_SYS_SOCKET_H
1127 #include <sys/socket.h>
1128 #endif
1129 
1130 #ifdef HAVE_SYS_UIO_H
1131 #include <sys/uio.h>
1132 #endif
1133 
1134 #ifdef HAVE_NETINET_IN_H
1135 #include <netinet/in.h>
1136 #endif
1137 
1138 #ifdef HAVE_NETINET_TCP_H
1139 #include <netinet/tcp.h>
1140 #endif
1141 
1142 #ifdef HAVE_ARPA_INET_H
1143 #include <arpa/inet.h>
1144 #endif
1145 
1146 #ifdef HAVE_WINSOCK2_H
1147 #include <winsock2.h>
1148 #endif
1149 
1150 #ifdef HAVE_WS2TCPIP_H
1151 #include <ws2tcpip.h>
1152 #endif
1153 
1154 #if !defined(USE_WINSOCK) || !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) || defined(__USE_MINGW_ANSI_STDIO)
1155 #define ARG_LL "%ll"
1156 #else
1157 #define ARG_LL "%I64"
1158 #endif
1159 
1160 #ifndef AF_LOCAL
1161 #define AF_LOCAL AF_UNIX
1162 #endif
1163 
1164 
1165 
1166 #ifdef HAVE_ATTR_FORMAT
1167 #  define ATTR_FORMAT(archetype, string_index, first_to_check) \
1168     __attribute__ ((format (archetype, string_index, first_to_check)))
1169 #else /* !HAVE_ATTR_FORMAT */
1170 #  define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
1171 #endif /* !HAVE_ATTR_FORMAT */
1172 
1173 
1174 #if defined(DOXYGEN)
1175 #  define ATTR_UNUSED(x)  x
1176 #elif defined(__cplusplus)
1177 #  define ATTR_UNUSED(x)
1178 #elif defined(HAVE_ATTR_UNUSED)
1179 #  define ATTR_UNUSED(x)  x __attribute__((unused))
1180 #else /* !HAVE_ATTR_UNUSED */
1181 #  define ATTR_UNUSED(x)  x
1182 #endif /* !HAVE_ATTR_UNUSED */
1183 
1184 
1185 #ifndef HAVE_FSEEKO
1186 #define fseeko fseek
1187 #define ftello ftell
1188 #endif /* HAVE_FSEEKO */
1189 
1190 
1191 #ifndef MAXHOSTNAMELEN
1192 #define MAXHOSTNAMELEN 256
1193 #endif
1194 
1195 #if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
1196 #define snprintf snprintf_unbound
1197 #define vsnprintf vsnprintf_unbound
1198 #include <stdarg.h>
1199 int snprintf (char *str, size_t count, const char *fmt, ...);
1200 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
1201 #endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
1202 
1203 #ifndef HAVE_INET_PTON
1204 #define inet_pton inet_pton_unbound
1205 int inet_pton(int af, const char* src, void* dst);
1206 #endif /* HAVE_INET_PTON */
1207 
1208 
1209 #ifndef HAVE_INET_NTOP
1210 #define inet_ntop inet_ntop_unbound
1211 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1212 #endif
1213 
1214 
1215 #ifndef HAVE_INET_ATON
1216 #define inet_aton inet_aton_unbound
1217 int inet_aton(const char *cp, struct in_addr *addr);
1218 #endif
1219 
1220 
1221 #ifndef HAVE_MEMMOVE
1222 #define memmove memmove_unbound
1223 void *memmove(void *dest, const void *src, size_t n);
1224 #endif
1225 
1226 
1227 #ifndef HAVE_STRLCAT
1228 #define strlcat strlcat_unbound
1229 size_t strlcat(char *dst, const char *src, size_t siz);
1230 #endif
1231 
1232 
1233 #ifndef HAVE_STRLCPY
1234 #define strlcpy strlcpy_unbound
1235 size_t strlcpy(char *dst, const char *src, size_t siz);
1236 #endif
1237 
1238 
1239 #ifndef HAVE_GMTIME_R
1240 #define gmtime_r gmtime_r_unbound
1241 struct tm *gmtime_r(const time_t *timep, struct tm *result);
1242 #endif
1243 
1244 
1245 #ifndef HAVE_REALLOCARRAY
1246 #define reallocarray reallocarrayunbound
1247 void* reallocarray(void *ptr, size_t nmemb, size_t size);
1248 #endif
1249 
1250 
1251 #if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1252 #define sleep(x) Sleep((x)*1000) /* on win32 */
1253 #endif /* HAVE_SLEEP */
1254 
1255 
1256 #ifndef HAVE_USLEEP
1257 #define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1258 #endif /* HAVE_USLEEP */
1259 
1260 
1261 #ifndef HAVE_RANDOM
1262 #define random rand /* on win32, for tests only (bad random) */
1263 #endif /* HAVE_RANDOM */
1264 
1265 
1266 #ifndef HAVE_SRANDOM
1267 #define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1268 #endif /* HAVE_SRANDOM */
1269 
1270 
1271 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1272 #ifdef HAVE_WINSOCK2_H
1273 #define FD_SET_T (u_int)
1274 #else
1275 #define FD_SET_T
1276 #endif
1277 
1278 
1279 #ifndef IPV6_MIN_MTU
1280 #define IPV6_MIN_MTU 1280
1281 #endif /* IPV6_MIN_MTU */
1282 
1283 
1284 #ifdef MEMCMP_IS_BROKEN
1285 #include "compat/memcmp.h"
1286 #define memcmp memcmp_unbound
1287 int memcmp(const void *x, const void *y, size_t n);
1288 #endif
1289 
1290 
1291 
1292 #ifndef HAVE_CTIME_R
1293 #define ctime_r unbound_ctime_r
1294 char *ctime_r(const time_t *timep, char *buf);
1295 #endif
1296 
1297 #ifndef HAVE_STRSEP
1298 #define strsep unbound_strsep
1299 char *strsep(char **stringp, const char *delim);
1300 #endif
1301 
1302 #ifndef HAVE_ISBLANK
1303 #define isblank unbound_isblank
1304 int isblank(int c);
1305 #endif
1306 
1307 #ifndef HAVE_EXPLICIT_BZERO
1308 // #define explicit_bzero unbound_explicit_bzero
1309 #define explicit_bzero(a, b) explicit_memset(a, 0, b)
1310 // void explicit_bzero(void* buf, size_t len);
1311 #endif
1312 
1313 #if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
1314 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1315 #endif
1316 
1317 #if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
1318 int inet_pton(int af, const char* src, void* dst);
1319 #endif
1320 
1321 #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1322 #define strptime unbound_strptime
1323 struct tm;
1324 char *strptime(const char *s, const char *format, struct tm *tm);
1325 #endif
1326 
1327 #if !HAVE_DECL_REALLOCARRAY
1328 void *reallocarray(void *ptr, size_t nmemb, size_t size);
1329 #endif
1330 
1331 #ifdef HAVE_LIBBSD
1332 #include <bsd/string.h>
1333 #include <bsd/stdlib.h>
1334 #endif
1335 
1336 #ifdef HAVE_LIBRESSL
1337 #  if !HAVE_DECL_STRLCPY
1338 size_t strlcpy(char *dst, const char *src, size_t siz);
1339 #  endif
1340 #  if !HAVE_DECL_STRLCAT
1341 size_t strlcat(char *dst, const char *src, size_t siz);
1342 #  endif
1343 #  if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1344 uint32_t arc4random(void);
1345 #  endif
1346 #  if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1347 uint32_t arc4random_uniform(uint32_t upper_bound);
1348 #  endif
1349 #endif /* HAVE_LIBRESSL */
1350 #ifndef HAVE_ARC4RANDOM
1351 int getentropy(void* buf, size_t len);
1352 uint32_t arc4random(void);
1353 void arc4random_buf(void* buf, size_t n);
1354 void _ARC4_LOCK(void);
1355 void _ARC4_UNLOCK(void);
1356 void _ARC4_LOCK_DESTROY(void);
1357 #endif
1358 #ifndef HAVE_ARC4RANDOM_UNIFORM
1359 uint32_t arc4random_uniform(uint32_t upper_bound);
1360 #endif
1361 #ifdef COMPAT_SHA512
1362 #ifndef SHA512_DIGEST_LENGTH
1363 #define SHA512_BLOCK_LENGTH		128
1364 #define SHA512_DIGEST_LENGTH		64
1365 #define SHA512_DIGEST_STRING_LENGTH	(SHA512_DIGEST_LENGTH * 2 + 1)
1366 typedef struct _SHA512_CTX {
1367 	uint64_t	state[8];
1368 	uint64_t	bitcount[2];
1369 	uint8_t	buffer[SHA512_BLOCK_LENGTH];
1370 } SHA512_CTX;
1371 #endif /* SHA512_DIGEST_LENGTH */
1372 void SHA512_Init(SHA512_CTX*);
1373 void SHA512_Update(SHA512_CTX*, void*, size_t);
1374 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1375 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1376 #endif /* COMPAT_SHA512 */
1377 
1378 
1379 
1380 #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))
1381    /* using version of libevent that is not threadsafe. */
1382 #  define LIBEVENT_SIGNAL_PROBLEM 1
1383 #endif
1384 
1385 #ifndef CHECKED_INET6
1386 #  define CHECKED_INET6
1387 #  ifdef AF_INET6
1388 #    define INET6
1389 #  else
1390 #    define AF_INET6        28
1391 #  endif
1392 #endif /* CHECKED_INET6 */
1393 
1394 #ifndef HAVE_GETADDRINFO
1395 struct sockaddr_storage;
1396 #include "compat/fake-rfc2553.h"
1397 #endif
1398 
1399 #ifdef UNBOUND_ALLOC_STATS
1400 #  define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1401 #  define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1402 #  define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1403 #  define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1404 void *unbound_stat_malloc(size_t size);
1405 void *unbound_stat_calloc(size_t nmemb, size_t size);
1406 void unbound_stat_free(void *ptr);
1407 void *unbound_stat_realloc(void *ptr, size_t size);
1408 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1409 	const char* func);
1410 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1411 	int line, const char* func);
1412 void unbound_stat_free_log(void *ptr, const char* file, int line,
1413 	const char* func);
1414 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1415 	int line, const char* func);
1416 #elif defined(UNBOUND_ALLOC_LITE)
1417 #  include "util/alloc.h"
1418 #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1419 
1420 /** default port for DNS traffic. */
1421 #define UNBOUND_DNS_PORT 53
1422 /** default port for DNS over TLS traffic. */
1423 #define UNBOUND_DNS_OVER_TLS_PORT 853
1424 /** default port for DNS over HTTPS traffic. */
1425 #define UNBOUND_DNS_OVER_HTTPS_PORT 443
1426 /** default port for unbound control traffic, registered port with IANA,
1427     ub-dns-control  8953/tcp    unbound dns nameserver control */
1428 #define UNBOUND_CONTROL_PORT 8953
1429 /** the version of unbound-control that this software implements */
1430 #define UNBOUND_CONTROL_VERSION 1
1431 
1432 
1433