config.h revision 1.22
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/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 "--enable-allsymbols --with-ssl=/usr --with-libevent=/usr --with-libexpat=/usr --without-pythonmodule --with-chroot-dir=/var/unbound --with-pidfile= --with-rootkey-file=/var/unbound/db/root.key --with-conf-file=/var/unbound/etc/unbound.conf --with-username=_unbound --disable-shared --disable-explicit-port-randomisation --without-pthreads"
21
22/* Pathname to the Unbound configuration file */
23#define CONFIGFILE "/var/unbound/etc/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#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1
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#define EXPORT_ALL_SYMBOLS 1
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#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
93
94/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */
95#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1
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#define HAVE_DECL_ARC4RANDOM 1
106
107/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
108   if you don't. */
109#define HAVE_DECL_ARC4RANDOM_UNIFORM 1
110
111/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if
112   you don't. */
113#define HAVE_DECL_EVSIGNAL_ASSIGN 0
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 0
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 1
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#define HAVE_DECL_STRLCAT 1
166
167/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
168   don't. */
169#define HAVE_DECL_STRLCPY 1
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#define HAVE_ENGINE_CLEANUP 1
195
196/* Define to 1 if you have the `ERR_free_strings' function. */
197#define HAVE_ERR_FREE_STRINGS 1
198
199/* Define to 1 if you have the `ERR_load_crypto_strings' function. */
200#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1
201
202/* Define to 1 if you have the `event_assign' function. */
203/* #undef HAVE_EVENT_ASSIGN */
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#define HAVE_EVP_CLEANUP 1
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#define HAVE_EXPLICIT_BZERO 1
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 `gettid' function. */
303/* #undef HAVE_GETTID */
304
305/* Define to 1 if you have the `glob' function. */
306#define HAVE_GLOB 1
307
308/* Define to 1 if you have the <glob.h> header file. */
309#define HAVE_GLOB_H 1
310
311/* Define to 1 if you have the `gmtime_r' function. */
312#define HAVE_GMTIME_R 1
313
314/* Define to 1 if you have the <grp.h> header file. */
315#define HAVE_GRP_H 1
316
317/* Define to 1 if you have the <hiredis/hiredis.h> header file. */
318/* #undef HAVE_HIREDIS_HIREDIS_H */
319
320/* Define to 1 if you have the `HMAC_Init_ex' function. */
321#define HAVE_HMAC_INIT_EX 1
322
323/* If we have htobe64 */
324#define HAVE_HTOBE64 1
325
326/* Define to 1 if you have the <ifaddrs.h> header file. */
327#define HAVE_IFADDRS_H 1
328
329/* Define to 1 if you have the `if_nametoindex' function. */
330#define HAVE_IF_NAMETOINDEX 1
331
332/* Define to 1 if you have the `inet_aton' function. */
333#define HAVE_INET_ATON 1
334
335/* Define to 1 if you have the `inet_ntop' function. */
336#define HAVE_INET_NTOP 1
337
338/* Define to 1 if you have the `inet_pton' function. */
339#define HAVE_INET_PTON 1
340
341/* Define to 1 if you have the `initgroups' function. */
342#define HAVE_INITGROUPS 1
343
344/* Define to 1 if you have the <inttypes.h> header file. */
345#define HAVE_INTTYPES_H 1
346
347/* if the function 'ioctlsocket' is available */
348/* #undef HAVE_IOCTLSOCKET */
349
350/* Define to 1 if you have the <iphlpapi.h> header file. */
351/* #undef HAVE_IPHLPAPI_H */
352
353/* Define to 1 if you have the `isblank' function. */
354#define HAVE_ISBLANK 1
355
356/* Define to 1 if you have the `kill' function. */
357#define HAVE_KILL 1
358
359/* Use portable libbsd functions */
360/* #undef HAVE_LIBBSD */
361
362/* Define to 1 if you have the <libkern/OSByteOrder.h> header file. */
363/* #undef HAVE_LIBKERN_OSBYTEORDER_H */
364
365/* Define if we have LibreSSL */
366#define HAVE_LIBRESSL 1
367
368/* Define to 1 if you have the <linux/net_tstamp.h> header file. */
369/* #undef HAVE_LINUX_NET_TSTAMP_H */
370
371/* Define to 1 if you have the `localtime_r' function. */
372#define HAVE_LOCALTIME_R 1
373
374/* Define to 1 if you have the <login_cap.h> header file. */
375#define HAVE_LOGIN_CAP_H 1
376
377/* If have GNU libc compatible malloc */
378#define HAVE_MALLOC 1
379
380/* Define to 1 if you have the `memmove' function. */
381#define HAVE_MEMMOVE 1
382
383/* Define to 1 if you have the <minix/config.h> header file. */
384/* #undef HAVE_MINIX_CONFIG_H */
385
386/* Define to 1 if you have the <netdb.h> header file. */
387#define HAVE_NETDB_H 1
388
389/* Define to 1 if you have the <netinet/in.h> header file. */
390#define HAVE_NETINET_IN_H 1
391
392/* Define to 1 if you have the <netinet/tcp.h> header file. */
393#define HAVE_NETINET_TCP_H 1
394
395/* Define to 1 if you have the <netioapi.h> header file. */
396/* #undef HAVE_NETIOAPI_H */
397
398/* Use libnettle for crypto */
399/* #undef HAVE_NETTLE */
400
401/* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
402/* #undef HAVE_NETTLE_DSA_COMPAT_H */
403
404/* Define to 1 if you have the <nettle/eddsa.h> header file. */
405/* #undef HAVE_NETTLE_EDDSA_H */
406
407/* Define to 1 if you have the <net/if.h> header file. */
408#define HAVE_NET_IF_H 1
409
410/* Define this to use nghttp2 client. */
411/* #undef HAVE_NGHTTP2 */
412
413/* Define to 1 if you have the <nghttp2/nghttp2.h> header file. */
414/* #undef HAVE_NGHTTP2_NGHTTP2_H */
415
416/* Use libnss for crypto */
417/* #undef HAVE_NSS */
418
419/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
420#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1
421
422/* Define to 1 if you have the <openssl/bn.h> header file. */
423#define HAVE_OPENSSL_BN_H 1
424
425/* Define to 1 if you have the `OPENSSL_config' function. */
426#define HAVE_OPENSSL_CONFIG 1
427
428/* Define to 1 if you have the <openssl/conf.h> header file. */
429#define HAVE_OPENSSL_CONF_H 1
430
431/* Define to 1 if you have the <openssl/core_names.h> header file. */
432/* #undef HAVE_OPENSSL_CORE_NAMES_H */
433
434/* Define to 1 if you have the <openssl/dh.h> header file. */
435#define HAVE_OPENSSL_DH_H 1
436
437/* Define to 1 if you have the <openssl/dsa.h> header file. */
438#define HAVE_OPENSSL_DSA_H 1
439
440/* Define to 1 if you have the <openssl/engine.h> header file. */
441#define HAVE_OPENSSL_ENGINE_H 1
442
443/* Define to 1 if you have the <openssl/err.h> header file. */
444#define HAVE_OPENSSL_ERR_H 1
445
446/* Define to 1 if you have the `OPENSSL_init_crypto' function. */
447#define HAVE_OPENSSL_INIT_CRYPTO 1
448
449/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
450#define HAVE_OPENSSL_INIT_SSL 1
451
452/* Define to 1 if you have the <openssl/param_build.h> header file. */
453/* #undef HAVE_OPENSSL_PARAM_BUILD_H */
454
455/* Define to 1 if you have the <openssl/rand.h> header file. */
456#define HAVE_OPENSSL_RAND_H 1
457
458/* Define to 1 if you have the <openssl/rsa.h> header file. */
459#define HAVE_OPENSSL_RSA_H 1
460
461/* Define to 1 if you have the <openssl/ssl.h> header file. */
462#define HAVE_OPENSSL_SSL_H 1
463
464/* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */
465/* #undef HAVE_OSSL_PARAM_BLD_NEW */
466
467/* Define to 1 if you have the `poll' function. */
468#define HAVE_POLL 1
469
470/* Define to 1 if you have the <poll.h> header file. */
471#define HAVE_POLL_H 1
472
473/* Define if you have POSIX threads libraries and header files. */
474/* #undef HAVE_PTHREAD */
475
476/* Have PTHREAD_PRIO_INHERIT. */
477/* #undef HAVE_PTHREAD_PRIO_INHERIT */
478
479/* Define to 1 if the system has the type `pthread_rwlock_t'. */
480/* #undef HAVE_PTHREAD_RWLOCK_T */
481
482/* Define to 1 if the system has the type `pthread_spinlock_t'. */
483/* #undef HAVE_PTHREAD_SPINLOCK_T */
484
485/* Define to 1 if you have the <pwd.h> header file. */
486#define HAVE_PWD_H 1
487
488/* Define if you have Python libraries and header files. */
489/* #undef HAVE_PYTHON */
490
491/* Define to 1 if you have the `random' function. */
492#define HAVE_RANDOM 1
493
494/* Define to 1 if you have the `RAND_cleanup' function. */
495#define HAVE_RAND_CLEANUP 1
496
497/* If we have reallocarray(3) */
498#define HAVE_REALLOCARRAY 1
499
500/* Define to 1 if you have the `recvmsg' function. */
501#define HAVE_RECVMSG 1
502
503/* Define to 1 if you have the `sendmsg' function. */
504#define HAVE_SENDMSG 1
505
506/* Define to 1 if you have the `setregid' function. */
507/* #undef HAVE_SETREGID */
508
509/* Define to 1 if you have the `setresgid' function. */
510#define HAVE_SETRESGID 1
511
512/* Define to 1 if you have the `setresuid' function. */
513#define HAVE_SETRESUID 1
514
515/* Define to 1 if you have the `setreuid' function. */
516/* #undef HAVE_SETREUID */
517
518/* Define to 1 if you have the `setrlimit' function. */
519#define HAVE_SETRLIMIT 1
520
521/* Define to 1 if you have the `setsid' function. */
522#define HAVE_SETSID 1
523
524/* Define to 1 if you have the `setusercontext' function. */
525#define HAVE_SETUSERCONTEXT 1
526
527/* Define to 1 if you have the `SHA512_Update' function. */
528/* #undef HAVE_SHA512_UPDATE */
529
530/* Define to 1 if you have the `shmget' function. */
531#define HAVE_SHMGET 1
532
533/* Define to 1 if you have the `sigprocmask' function. */
534#define HAVE_SIGPROCMASK 1
535
536/* Define to 1 if you have the `sleep' function. */
537#define HAVE_SLEEP 1
538
539/* Define to 1 if you have the `snprintf' function. */
540#define HAVE_SNPRINTF 1
541
542/* Define to 1 if you have the `socketpair' function. */
543#define HAVE_SOCKETPAIR 1
544
545/* Using Solaris threads */
546/* #undef HAVE_SOLARIS_THREADS */
547
548/* Define to 1 if you have the `srandom' function. */
549#define HAVE_SRANDOM 1
550
551/* Define if you have the SSL libraries installed. */
552#define HAVE_SSL /**/
553
554/* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */
555#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1
556
557/* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */
558#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1
559
560/* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */
561#define HAVE_SSL_CTX_SET_CIPHERSUITES 1
562
563/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
564#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1
565
566/* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb'
567   function. */
568/* #undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB */
569
570/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */
571#define HAVE_SSL_GET0_ALPN_SELECTED 1
572
573/* Define to 1 if you have the `SSL_get0_peername' function. */
574#define HAVE_SSL_GET0_PEERNAME 1
575
576/* Define to 1 if you have the `SSL_get1_peer_certificate' function. */
577/* #undef HAVE_SSL_GET1_PEER_CERTIFICATE */
578
579/* Define to 1 if you have the `SSL_set1_host' function. */
580#define HAVE_SSL_SET1_HOST 1
581
582/* Define to 1 if you have the <stdarg.h> header file. */
583#define HAVE_STDARG_H 1
584
585/* Define to 1 if you have the <stdbool.h> header file. */
586#define HAVE_STDBOOL_H 1
587
588/* Define to 1 if you have the <stdint.h> header file. */
589#define HAVE_STDINT_H 1
590
591/* Define to 1 if you have the <stdio.h> header file. */
592#define HAVE_STDIO_H 1
593
594/* Define to 1 if you have the <stdlib.h> header file. */
595#define HAVE_STDLIB_H 1
596
597/* Define to 1 if you have the `strftime' function. */
598#define HAVE_STRFTIME 1
599
600/* Define to 1 if you have the <strings.h> header file. */
601#define HAVE_STRINGS_H 1
602
603/* Define to 1 if you have the <string.h> header file. */
604#define HAVE_STRING_H 1
605
606/* Define to 1 if you have the `strlcat' function. */
607#define HAVE_STRLCAT 1
608
609/* Define to 1 if you have the `strlcpy' function. */
610#define HAVE_STRLCPY 1
611
612/* Define to 1 if you have the `strptime' function. */
613#define HAVE_STRPTIME 1
614
615/* Define to 1 if you have the `strsep' function. */
616#define HAVE_STRSEP 1
617
618/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
619/* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */
620
621/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
622#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
623
624/* Define if you have Swig libraries and header files. */
625/* #undef HAVE_SWIG */
626
627/* Define to 1 if you have the <syslog.h> header file. */
628#define HAVE_SYSLOG_H 1
629
630/* Define to 1 if systemd should be used */
631/* #undef HAVE_SYSTEMD */
632
633/* Define to 1 if you have the <sys/endian.h> header file. */
634#define HAVE_SYS_ENDIAN_H 1
635
636/* Define to 1 if you have the <sys/ipc.h> header file. */
637#define HAVE_SYS_IPC_H 1
638
639/* Define to 1 if you have the <sys/param.h> header file. */
640#define HAVE_SYS_PARAM_H 1
641
642/* Define to 1 if you have the <sys/resource.h> header file. */
643#define HAVE_SYS_RESOURCE_H 1
644
645/* Define to 1 if you have the <sys/select.h> header file. */
646#define HAVE_SYS_SELECT_H 1
647
648/* Define to 1 if you have the <sys/sha2.h> header file. */
649/* #undef HAVE_SYS_SHA2_H */
650
651/* Define to 1 if you have the <sys/shm.h> header file. */
652#define HAVE_SYS_SHM_H 1
653
654/* Define to 1 if you have the <sys/socket.h> header file. */
655#define HAVE_SYS_SOCKET_H 1
656
657/* Define to 1 if you have the <sys/stat.h> header file. */
658#define HAVE_SYS_STAT_H 1
659
660/* Define to 1 if you have the <sys/sysctl.h> header file. */
661/* #undef HAVE_SYS_SYSCTL_H */
662
663/* Define to 1 if you have the <sys/types.h> header file. */
664#define HAVE_SYS_TYPES_H 1
665
666/* Define to 1 if you have the <sys/uio.h> header file. */
667#define HAVE_SYS_UIO_H 1
668
669/* Define to 1 if you have the <sys/un.h> header file. */
670#define HAVE_SYS_UN_H 1
671
672/* Define to 1 if you have the <sys/wait.h> header file. */
673#define HAVE_SYS_WAIT_H 1
674
675/* Define to 1 if you have the <TargetConditionals.h> header file. */
676/* #undef HAVE_TARGETCONDITIONALS_H */
677
678/* Define to 1 if you have the <time.h> header file. */
679#define HAVE_TIME_H 1
680
681/* Define to 1 if you have the `tzset' function. */
682#define HAVE_TZSET 1
683
684/* Define to 1 if you have the <unistd.h> header file. */
685#define HAVE_UNISTD_H 1
686
687/* Define to 1 if you have the `usleep' function. */
688#define HAVE_USLEEP 1
689
690/* Define to 1 if you have the `vfork' function. */
691#define HAVE_VFORK 1
692
693/* Define to 1 if you have the <vfork.h> header file. */
694/* #undef HAVE_VFORK_H */
695
696/* Define to 1 if you have the <wchar.h> header file. */
697#define HAVE_WCHAR_H 1
698
699/* Define to 1 if you have the <windows.h> header file. */
700/* #undef HAVE_WINDOWS_H */
701
702/* Using Windows threads */
703/* #undef HAVE_WINDOWS_THREADS */
704
705/* Define to 1 if you have the <winsock2.h> header file. */
706/* #undef HAVE_WINSOCK2_H */
707
708/* Define to 1 if `fork' works. */
709#define HAVE_WORKING_FORK 1
710
711/* Define to 1 if `vfork' works. */
712#define HAVE_WORKING_VFORK 1
713
714/* Define to 1 if you have the `writev' function. */
715#define HAVE_WRITEV 1
716
717/* Define to 1 if you have the <ws2tcpip.h> header file. */
718/* #undef HAVE_WS2TCPIP_H */
719
720/* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */
721#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1
722
723/* Define to 1 if you have the `_beginthreadex' function. */
724/* #undef HAVE__BEGINTHREADEX */
725
726/* If HMAC_Init_ex() returns void */
727/* #undef HMAC_INIT_EX_RETURNS_VOID */
728
729/* if lex has yylex_destroy */
730#define LEX_HAS_YYLEX_DESTROY 1
731
732/* Define to the sub-directory where libtool stores uninstalled libraries. */
733#define LT_OBJDIR ".libs/"
734
735/* Define to the maximum message length to pass to syslog. */
736#define MAXSYSLOGMSGLEN 10240
737
738/* Define if memcmp() does not compare unsigned bytes */
739/* #undef MEMCMP_IS_BROKEN */
740
741/* Define if mkdir has one argument. */
742/* #undef MKDIR_HAS_ONE_ARG */
743
744/* Define if the network stack does not fully support nonblocking io (causes
745   lower performance). */
746/* #undef NONBLOCKING_IS_BROKEN */
747
748/* Put -D_ALL_SOURCE define in config.h */
749/* #undef OMITTED__D_ALL_SOURCE */
750
751/* Put -D_BSD_SOURCE define in config.h */
752/* #undef OMITTED__D_BSD_SOURCE */
753
754/* Put -D_DEFAULT_SOURCE define in config.h */
755/* #undef OMITTED__D_DEFAULT_SOURCE */
756
757/* Put -D_GNU_SOURCE define in config.h */
758/* #undef OMITTED__D_GNU_SOURCE */
759
760/* Put -D_LARGEFILE_SOURCE=1 define in config.h */
761/* #undef OMITTED__D_LARGEFILE_SOURCE_1 */
762
763/* Put -D_POSIX_C_SOURCE=200112 define in config.h */
764/* #undef OMITTED__D_POSIX_C_SOURCE_200112 */
765
766/* Put -D_XOPEN_SOURCE=600 define in config.h */
767/* #undef OMITTED__D_XOPEN_SOURCE_600 */
768
769/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
770/* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */
771
772/* Put -D__EXTENSIONS__ define in config.h */
773/* #undef OMITTED__D__EXTENSIONS__ */
774
775/* Define to the address where bug reports for this package should be sent. */
776#define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues"
777
778/* Define to the full name of this package. */
779#define PACKAGE_NAME "unbound"
780
781/* Define to the full name and version of this package. */
782#define PACKAGE_STRING "unbound 1.20.0"
783
784/* Define to the one symbol short name of this package. */
785#define PACKAGE_TARNAME "unbound"
786
787/* Define to the home page for this package. */
788#define PACKAGE_URL ""
789
790/* Define to the version of this package. */
791#define PACKAGE_VERSION "1.20.0"
792
793/* default pidfile location */
794#define PIDFILE ""
795
796/* Define to necessary symbol if this constant uses a non-standard name on
797   your system. */
798/* #undef PTHREAD_CREATE_JOINABLE */
799
800/* Return type of signal handlers, but autoconf 2.70 says 'your code may
801   safely assume C89 semantics that RETSIGTYPE is void.' */
802#define RETSIGTYPE void
803
804/* if REUSEPORT is enabled by default */
805#define REUSEPORT_DEFAULT 0
806
807/* default rootkey location */
808#define ROOT_ANCHOR_FILE "/var/unbound/db/root.key"
809
810/* default rootcert location */
811#define ROOT_CERT_FILE "/var/unbound/etc/icannbundle.pem"
812
813/* version number for resource files */
814#define RSRC_PACKAGE_VERSION 1,20,0,0
815
816/* Directory to chdir to */
817#define RUN_DIR "/var/unbound/etc"
818
819/* Shared data */
820#define SHARE_DIR "/var/unbound/etc"
821
822/* The size of `pthread_t', as computed by sizeof. */
823/* #undef SIZEOF_PTHREAD_T */
824
825/* The size of `size_t', as computed by sizeof. */
826#define SIZEOF_SIZE_T 8
827
828/* The size of `time_t', as computed by sizeof. */
829#define SIZEOF_TIME_T 8
830
831/* The size of `unsigned long', as computed by sizeof. */
832/* #undef SIZEOF_UNSIGNED_LONG */
833
834/* define if (v)snprintf does not return length needed, (but length used) */
835/* #undef SNPRINTF_RET_BROKEN */
836
837/* Define to 1 if libsodium supports sodium_set_misuse_handler */
838/* #undef SODIUM_MISUSE_HANDLER */
839
840/* Define to 1 if all of the C90 standard headers exist (not just the ones
841   required in a freestanding environment). This macro is provided for
842   backward compatibility; new code need not use it. */
843#define STDC_HEADERS 1
844
845/* use default strptime. */
846#define STRPTIME_WORKS 1
847
848/* Use win32 resources and API */
849/* #undef UB_ON_WINDOWS */
850
851/* the SYSLOG_FACILITY to use, default LOG_DAEMON */
852#define UB_SYSLOG_FACILITY LOG_DAEMON
853
854/* default username */
855#define UB_USERNAME "_unbound"
856
857/* use to enable lightweight alloc assertions, for debug use */
858/* #undef UNBOUND_ALLOC_LITE */
859
860/* use malloc not regions, for debug use */
861/* #undef UNBOUND_ALLOC_NONREGIONAL */
862
863/* use statistics for allocs and frees, for debug use */
864/* #undef UNBOUND_ALLOC_STATS */
865
866/* define this to enable debug checks. */
867/* #undef UNBOUND_DEBUG */
868
869/* Define to 1 to use cachedb support */
870/* #undef USE_CACHEDB */
871
872/* Define to 1 to enable dnscrypt support */
873/* #undef USE_DNSCRYPT */
874
875/* Define to 1 to enable dnscrypt with xchacha20 support */
876/* #undef USE_DNSCRYPT_XCHACHA20 */
877
878/* Define to 1 to enable dnstap support */
879/* #undef USE_DNSTAP */
880
881/* Define this to enable DSA support. */
882/* #undef USE_DSA */
883
884/* Define this to enable ECDSA support. */
885#define USE_ECDSA 1
886
887/* Define this to enable an EVP workaround for older openssl */
888/* #undef USE_ECDSA_EVP_WORKAROUND */
889
890/* Define this to enable ED25519 support. */
891#define USE_ED25519 1
892
893/* Define this to enable ED448 support. */
894/* #undef USE_ED448 */
895
896/* Define this to enable GOST support. */
897/* #undef USE_GOST */
898
899/* Define to 1 to use ipsecmod support. */
900/* #undef USE_IPSECMOD */
901
902/* Define to 1 to use ipset support */
903/* #undef USE_IPSET */
904
905/* Define if you enable libevent */
906#define USE_LIBEVENT 1
907
908/* Define this to enable use of /proc/sys/net/ipv4/ip_local_port_range as a
909   default outgoing port range. This is only for the libunbound on Linux and
910   does not affect unbound resolving daemon itself. This may severely limit
911   the number of available outgoing ports and thus decrease randomness. Define
912   this only when the target system restricts (e.g. some of SELinux enabled
913   distributions) the use of non-ephemeral ports. */
914/* #undef USE_LINUX_IP_LOCAL_PORT_RANGE */
915
916/* Define if you want to use internal select based events */
917/* #undef USE_MINI_EVENT */
918
919/* Define this to enable client TCP Fast Open. */
920/* #undef USE_MSG_FASTOPEN */
921
922/* Define this to enable client TCP Fast Open. */
923/* #undef USE_OSX_MSG_FASTOPEN */
924
925/* Define this to use hiredis client. */
926/* #undef USE_REDIS */
927
928/* Define this to enable SHA1 support. */
929#define USE_SHA1 1
930
931/* Define this to enable SHA256 and SHA512 support. */
932#define USE_SHA2 1
933
934/* Enable extensions on AIX 3, Interix.  */
935#ifndef _ALL_SOURCE
936# define _ALL_SOURCE 1
937#endif
938/* Enable general extensions on macOS.  */
939#ifndef _DARWIN_C_SOURCE
940# define _DARWIN_C_SOURCE 1
941#endif
942/* Enable general extensions on Solaris.  */
943#ifndef __EXTENSIONS__
944# define __EXTENSIONS__ 1
945#endif
946/* Enable GNU extensions on systems that have them.  */
947#ifndef _GNU_SOURCE
948# define _GNU_SOURCE 1
949#endif
950/* Enable X/Open compliant socket functions that do not require linking
951   with -lxnet on HP-UX 11.11.  */
952#ifndef _HPUX_ALT_XOPEN_SOCKET_API
953# define _HPUX_ALT_XOPEN_SOCKET_API 1
954#endif
955/* Identify the host operating system as Minix.
956   This macro does not affect the system headers' behavior.
957   A future release of Autoconf may stop defining this macro.  */
958#ifndef _MINIX
959/* # undef _MINIX */
960#endif
961/* Enable general extensions on NetBSD.
962   Enable NetBSD compatibility extensions on Minix.  */
963#ifndef _NETBSD_SOURCE
964# define _NETBSD_SOURCE 1
965#endif
966/* Enable OpenBSD compatibility extensions on NetBSD.
967   Oddly enough, this does nothing on OpenBSD.  */
968#ifndef _OPENBSD_SOURCE
969# define _OPENBSD_SOURCE 1
970#endif
971/* Define to 1 if needed for POSIX-compatible behavior.  */
972#ifndef _POSIX_SOURCE
973/* # undef _POSIX_SOURCE */
974#endif
975/* Define to 2 if needed for POSIX-compatible behavior.  */
976#ifndef _POSIX_1_SOURCE
977/* # undef _POSIX_1_SOURCE */
978#endif
979/* Enable POSIX-compatible threading on Solaris.  */
980#ifndef _POSIX_PTHREAD_SEMANTICS
981# define _POSIX_PTHREAD_SEMANTICS 1
982#endif
983/* Enable extensions specified by ISO/IEC TS 18661-5:2014.  */
984#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
985# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
986#endif
987/* Enable extensions specified by ISO/IEC TS 18661-1:2014.  */
988#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
989# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
990#endif
991/* Enable extensions specified by ISO/IEC TS 18661-2:2015.  */
992#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
993# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
994#endif
995/* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
996#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
997# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
998#endif
999/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
1000#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
1001# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
1002#endif
1003/* Enable extensions specified by ISO/IEC TR 24731-2:2010.  */
1004#ifndef __STDC_WANT_LIB_EXT2__
1005# define __STDC_WANT_LIB_EXT2__ 1
1006#endif
1007/* Enable extensions specified by ISO/IEC 24747:2009.  */
1008#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
1009# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
1010#endif
1011/* Enable extensions on HP NonStop.  */
1012#ifndef _TANDEM_SOURCE
1013# define _TANDEM_SOURCE 1
1014#endif
1015/* Enable X/Open extensions.  Define to 500 only if necessary
1016   to make mbstate_t available.  */
1017#ifndef _XOPEN_SOURCE
1018/* # undef _XOPEN_SOURCE */
1019#endif
1020
1021
1022/* Define this to enable server TCP Fast Open. */
1023/* #undef USE_TCP_FASTOPEN */
1024
1025/* Whether the windows socket API is used */
1026/* #undef USE_WINSOCK */
1027
1028/* the version of the windows API enabled */
1029#define WINVER 0x0502
1030
1031/* Define if you want dynlib module. */
1032/* #undef WITH_DYNLIBMODULE */
1033
1034/* Define if you want Python module. */
1035/* #undef WITH_PYTHONMODULE */
1036
1037/* Define if you want PyUnbound. */
1038/* #undef WITH_PYUNBOUND */
1039
1040/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
1041   `char[]'. */
1042#define YYTEXT_POINTER 1
1043
1044/* Number of bits in a file offset, on hosts where this is settable. */
1045/* #undef _FILE_OFFSET_BITS */
1046
1047/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
1048/* #undef _LARGEFILE_SOURCE */
1049
1050/* Define for large files, on AIX-style hosts. */
1051/* #undef _LARGE_FILES */
1052
1053/* Enable for compile on Minix */
1054#define _NETBSD_SOURCE 1
1055
1056/* defined to use gcc ansi snprintf and sscanf that understands %lld when
1057   compiled for windows. */
1058/* #undef __USE_MINGW_ANSI_STDIO */
1059
1060/* Define to empty if `const' does not conform to ANSI C. */
1061/* #undef const */
1062
1063/* Define to `int' if <sys/types.h> doesn't define. */
1064/* #undef gid_t */
1065
1066/* in_addr_t */
1067/* #undef in_addr_t */
1068
1069/* in_port_t */
1070/* #undef in_port_t */
1071
1072/* Define to `__inline__' or `__inline' if that's what the C compiler
1073   calls it, or to nothing if 'inline' is not supported under any name.  */
1074#ifndef __cplusplus
1075/* #undef inline */
1076#endif
1077
1078/* Define to `short' if <sys/types.h> does not define. */
1079/* #undef int16_t */
1080
1081/* Define to `int' if <sys/types.h> does not define. */
1082/* #undef int32_t */
1083
1084/* Define to `long long' if <sys/types.h> does not define. */
1085/* #undef int64_t */
1086
1087/* Define to `signed char' if <sys/types.h> does not define. */
1088/* #undef int8_t */
1089
1090/* Define if replacement function should be used. */
1091/* #undef malloc */
1092
1093/* Define to `long int' if <sys/types.h> does not define. */
1094/* #undef off_t */
1095
1096/* Define as a signed integer type capable of holding a process identifier. */
1097/* #undef pid_t */
1098
1099/* Define to 'int' if not defined */
1100/* #undef rlim_t */
1101
1102/* Define to `unsigned int' if <sys/types.h> does not define. */
1103/* #undef size_t */
1104
1105/* Define to 'int' if not defined */
1106/* #undef socklen_t */
1107
1108/* Define to `int' if <sys/types.h> does not define. */
1109/* #undef ssize_t */
1110
1111/* Define to 'unsigned char if not defined */
1112/* #undef u_char */
1113
1114/* Define to `int' if <sys/types.h> doesn't define. */
1115/* #undef uid_t */
1116
1117/* Define to `unsigned short' if <sys/types.h> does not define. */
1118/* #undef uint16_t */
1119
1120/* Define to `unsigned int' if <sys/types.h> does not define. */
1121/* #undef uint32_t */
1122
1123/* Define to `unsigned long long' if <sys/types.h> does not define. */
1124/* #undef uint64_t */
1125
1126/* Define to `unsigned char' if <sys/types.h> does not define. */
1127/* #undef uint8_t */
1128
1129/* Define as `fork' if `vfork' does not work. */
1130/* #undef vfork */
1131
1132#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
1133#define _GNU_SOURCE 1
1134#endif
1135
1136#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
1137#define _BSD_SOURCE 1
1138#endif
1139
1140#if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
1141#define _DEFAULT_SOURCE 1
1142#endif
1143
1144#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
1145#define __EXTENSIONS__ 1
1146#endif
1147
1148#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
1149#define _POSIX_C_SOURCE 200112
1150#endif
1151
1152#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
1153#define _XOPEN_SOURCE 600
1154#endif
1155
1156#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
1157#define _XOPEN_SOURCE_EXTENDED 1
1158#endif
1159
1160#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
1161#define _ALL_SOURCE 1
1162#endif
1163
1164#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
1165#define _LARGEFILE_SOURCE 1
1166#endif
1167
1168
1169
1170
1171#ifndef _OPENBSD_SOURCE
1172#define _OPENBSD_SOURCE 1
1173#endif
1174
1175#ifndef UNBOUND_DEBUG
1176# ifndef NDEBUG
1177#  define NDEBUG
1178# endif
1179#endif
1180
1181/** Use small-ldns codebase */
1182#define USE_SLDNS 1
1183#ifdef HAVE_SSL
1184#  define LDNS_BUILD_CONFIG_HAVE_SSL 1
1185#endif
1186
1187#include <stdio.h>
1188#include <string.h>
1189#include <unistd.h>
1190#include <assert.h>
1191
1192#if STDC_HEADERS
1193#include <stdlib.h>
1194#include <stddef.h>
1195#endif
1196
1197#ifdef HAVE_STDARG_H
1198#include <stdarg.h>
1199#endif
1200
1201#ifdef HAVE_STDINT_H
1202#include <stdint.h>
1203#endif
1204
1205#include <errno.h>
1206
1207#if HAVE_SYS_PARAM_H
1208#include <sys/param.h>
1209#endif
1210
1211#ifdef HAVE_SYS_SOCKET_H
1212#include <sys/socket.h>
1213#endif
1214
1215#ifdef HAVE_SYS_UIO_H
1216#include <sys/uio.h>
1217#endif
1218
1219#ifdef HAVE_NETINET_IN_H
1220#include <netinet/in.h>
1221#endif
1222
1223#ifdef HAVE_NETINET_TCP_H
1224#include <netinet/tcp.h>
1225#endif
1226
1227#ifdef HAVE_ARPA_INET_H
1228#include <arpa/inet.h>
1229#endif
1230
1231#ifdef HAVE_WINSOCK2_H
1232#include <winsock2.h>
1233#endif
1234
1235#ifdef HAVE_WS2TCPIP_H
1236#include <ws2tcpip.h>
1237#endif
1238
1239#if !defined(USE_WINSOCK) || !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) || defined(__USE_MINGW_ANSI_STDIO)
1240#define ARG_LL "%ll"
1241#else
1242#define ARG_LL "%I64"
1243#endif
1244
1245#ifndef AF_LOCAL
1246#define AF_LOCAL AF_UNIX
1247#endif
1248
1249
1250
1251#ifdef HAVE_ATTR_FORMAT
1252#  define ATTR_FORMAT(archetype, string_index, first_to_check) \
1253    __attribute__ ((format (archetype, string_index, first_to_check)))
1254#else /* !HAVE_ATTR_FORMAT */
1255#  define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
1256#endif /* !HAVE_ATTR_FORMAT */
1257
1258
1259#if defined(DOXYGEN)
1260#  define ATTR_UNUSED(x)  x
1261#elif defined(__cplusplus)
1262#  define ATTR_UNUSED(x)
1263#elif defined(HAVE_ATTR_UNUSED)
1264#  define ATTR_UNUSED(x)  x __attribute__((unused))
1265#else /* !HAVE_ATTR_UNUSED */
1266#  define ATTR_UNUSED(x)  x
1267#endif /* !HAVE_ATTR_UNUSED */
1268
1269
1270#ifndef HAVE_FSEEKO
1271#define fseeko fseek
1272#define ftello ftell
1273#endif /* HAVE_FSEEKO */
1274
1275
1276#ifndef MAXHOSTNAMELEN
1277#define MAXHOSTNAMELEN 256
1278#endif
1279
1280#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
1281#define snprintf snprintf_unbound
1282#define vsnprintf vsnprintf_unbound
1283#include <stdarg.h>
1284int snprintf (char *str, size_t count, const char *fmt, ...);
1285int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
1286#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
1287
1288#ifndef HAVE_INET_PTON
1289#define inet_pton inet_pton_unbound
1290int inet_pton(int af, const char* src, void* dst);
1291#endif /* HAVE_INET_PTON */
1292
1293
1294#ifndef HAVE_INET_NTOP
1295#define inet_ntop inet_ntop_unbound
1296const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1297#endif
1298
1299
1300#ifndef HAVE_INET_ATON
1301#define inet_aton inet_aton_unbound
1302int inet_aton(const char *cp, struct in_addr *addr);
1303#endif
1304
1305
1306#ifndef HAVE_MEMMOVE
1307#define memmove memmove_unbound
1308void *memmove(void *dest, const void *src, size_t n);
1309#endif
1310
1311
1312#ifndef HAVE_STRLCAT
1313#define strlcat strlcat_unbound
1314size_t strlcat(char *dst, const char *src, size_t siz);
1315#endif
1316
1317
1318#ifndef HAVE_STRLCPY
1319#define strlcpy strlcpy_unbound
1320size_t strlcpy(char *dst, const char *src, size_t siz);
1321#endif
1322
1323
1324#ifndef HAVE_GMTIME_R
1325#define gmtime_r gmtime_r_unbound
1326struct tm *gmtime_r(const time_t *timep, struct tm *result);
1327#endif
1328
1329
1330#ifndef HAVE_REALLOCARRAY
1331#define reallocarray reallocarrayunbound
1332void* reallocarray(void *ptr, size_t nmemb, size_t size);
1333#endif
1334
1335
1336#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1337#define sleep(x) Sleep((x)*1000) /* on win32 */
1338#endif /* HAVE_SLEEP */
1339
1340
1341#ifndef HAVE_USLEEP
1342#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1343#endif /* HAVE_USLEEP */
1344
1345
1346#ifndef HAVE_RANDOM
1347#define random rand /* on win32, for tests only (bad random) */
1348#endif /* HAVE_RANDOM */
1349
1350
1351#ifndef HAVE_SRANDOM
1352#define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1353#endif /* HAVE_SRANDOM */
1354
1355
1356/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1357#ifdef HAVE_WINSOCK2_H
1358#define FD_SET_T (u_int)
1359#else
1360#define FD_SET_T
1361#endif
1362
1363
1364#ifndef IPV6_MIN_MTU
1365#define IPV6_MIN_MTU 1280
1366#endif /* IPV6_MIN_MTU */
1367
1368
1369#ifdef MEMCMP_IS_BROKEN
1370#include "compat/memcmp.h"
1371#define memcmp memcmp_unbound
1372int memcmp(const void *x, const void *y, size_t n);
1373#endif
1374
1375
1376
1377#ifndef HAVE_CTIME_R
1378#define ctime_r unbound_ctime_r
1379char *ctime_r(const time_t *timep, char *buf);
1380#endif
1381
1382#ifndef HAVE_STRSEP
1383#define strsep unbound_strsep
1384char *strsep(char **stringp, const char *delim);
1385#endif
1386
1387#ifndef HAVE_ISBLANK
1388#define isblank unbound_isblank
1389int isblank(int c);
1390#endif
1391
1392#ifndef HAVE_EXPLICIT_BZERO
1393#define explicit_bzero unbound_explicit_bzero
1394void explicit_bzero(void* buf, size_t len);
1395#endif
1396
1397#if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
1398const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1399#endif
1400
1401#if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
1402int inet_pton(int af, const char* src, void* dst);
1403#endif
1404
1405#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1406#define strptime unbound_strptime
1407struct tm;
1408char *strptime(const char *s, const char *format, struct tm *tm);
1409#endif
1410
1411#if !HAVE_DECL_REALLOCARRAY
1412void *reallocarray(void *ptr, size_t nmemb, size_t size);
1413#endif
1414
1415#ifdef HAVE_LIBBSD
1416#include <bsd/string.h>
1417#include <bsd/stdlib.h>
1418#endif
1419
1420#ifdef HAVE_LIBRESSL
1421#  if !HAVE_DECL_STRLCPY
1422size_t strlcpy(char *dst, const char *src, size_t siz);
1423#  endif
1424#  if !HAVE_DECL_STRLCAT
1425size_t strlcat(char *dst, const char *src, size_t siz);
1426#  endif
1427#  if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1428uint32_t arc4random(void);
1429#  endif
1430#  if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1431uint32_t arc4random_uniform(uint32_t upper_bound);
1432#  endif
1433#endif /* HAVE_LIBRESSL */
1434#ifndef HAVE_ARC4RANDOM
1435int getentropy(void* buf, size_t len);
1436uint32_t arc4random(void);
1437void arc4random_buf(void* buf, size_t n);
1438void _ARC4_LOCK(void);
1439void _ARC4_UNLOCK(void);
1440void _ARC4_LOCK_DESTROY(void);
1441#endif
1442#ifndef HAVE_ARC4RANDOM_UNIFORM
1443uint32_t arc4random_uniform(uint32_t upper_bound);
1444#endif
1445#ifdef COMPAT_SHA512
1446#ifndef SHA512_DIGEST_LENGTH
1447#define SHA512_BLOCK_LENGTH		128
1448#define SHA512_DIGEST_LENGTH		64
1449#define SHA512_DIGEST_STRING_LENGTH	(SHA512_DIGEST_LENGTH * 2 + 1)
1450typedef struct _SHA512_CTX {
1451	uint64_t	state[8];
1452	uint64_t	bitcount[2];
1453	uint8_t	buffer[SHA512_BLOCK_LENGTH];
1454} SHA512_CTX;
1455#endif /* SHA512_DIGEST_LENGTH */
1456void SHA512_Init(SHA512_CTX*);
1457void SHA512_Update(SHA512_CTX*, void*, size_t);
1458void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1459unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1460#endif /* COMPAT_SHA512 */
1461
1462
1463
1464#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))
1465   /* using version of libevent that is not threadsafe. */
1466#  define LIBEVENT_SIGNAL_PROBLEM 1
1467#endif
1468
1469#ifndef CHECKED_INET6
1470#  define CHECKED_INET6
1471#  ifdef AF_INET6
1472#    define INET6
1473#  else
1474#    define AF_INET6        28
1475#  endif
1476#endif /* CHECKED_INET6 */
1477
1478#ifndef HAVE_GETADDRINFO
1479struct sockaddr_storage;
1480#include "compat/fake-rfc2553.h"
1481#endif
1482
1483#ifdef UNBOUND_ALLOC_STATS
1484#  define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1485#  define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1486#  define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1487#  define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1488void *unbound_stat_malloc(size_t size);
1489void *unbound_stat_calloc(size_t nmemb, size_t size);
1490void unbound_stat_free(void *ptr);
1491void *unbound_stat_realloc(void *ptr, size_t size);
1492void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1493	const char* func);
1494void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1495	int line, const char* func);
1496void unbound_stat_free_log(void *ptr, const char* file, int line,
1497	const char* func);
1498void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1499	int line, const char* func);
1500#elif defined(UNBOUND_ALLOC_LITE)
1501#  include "util/alloc.h"
1502#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1503
1504/** default port for DNS traffic. */
1505#define UNBOUND_DNS_PORT 53
1506/** default port for DNS over TLS traffic. */
1507#define UNBOUND_DNS_OVER_TLS_PORT 853
1508/** default port for DNS over HTTPS traffic. */
1509#define UNBOUND_DNS_OVER_HTTPS_PORT 443
1510/** default port for unbound control traffic, registered port with IANA,
1511    ub-dns-control  8953/tcp    unbound dns nameserver control */
1512#define UNBOUND_CONTROL_PORT 8953
1513/** the version of unbound-control that this software implements */
1514#define UNBOUND_CONTROL_VERSION 1
1515
1516
1517