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