1 /* config.h.in. Generated from configure.ac by autoheader. */
3 /* apply the noreturn attribute to a function that exits the program */
6 /* apply the weak attribute to a symbol */
9 /* Directory to chroot to */
12 /* Define this to enable client subnet option. */
15 /* Do sha512 definitions in config.h */
18 /* Command line arguments used with configure */
21 /* Pathname to the Unbound configuration file */
24 /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
26 #undef DARWIN_BROKEN_SETREUID
28 /* Whether daemon is deprecated */
29 #undef DEPRECATED_DAEMON
31 /* default dnstap socket path */
32 #undef DNSTAP_SOCKET_PATH
34 /* Define if you want to use debug lock checking (slow). */
35 #undef ENABLE_LOCK_CHECKS
37 /* Define this if you enabled-allsymbols from libunbound to link binaries to
38 it for smaller install size, but the libunbound export table is polluted by
40 #undef EXPORT_ALL_SYMBOLS
42 /* Define to 1 if you have the `accept4' function. */
45 /* Define to 1 if you have the `arc4random' function. */
46 #undef HAVE_ARC4RANDOM
48 /* Define to 1 if you have the `arc4random_uniform' function. */
49 #undef HAVE_ARC4RANDOM_UNIFORM
51 /* Define to 1 if you have the <arpa/inet.h> header file. */
52 #undef HAVE_ARPA_INET_H
54 /* Whether the C compiler accepts the "format" attribute */
55 #undef HAVE_ATTR_FORMAT
57 /* Whether the C compiler accepts the "noreturn" attribute */
58 #undef HAVE_ATTR_NORETURN
60 /* Whether the C compiler accepts the "unused" attribute */
61 #undef HAVE_ATTR_UNUSED
63 /* Whether the C compiler accepts the "weak" attribute */
66 /* Define to 1 if you have the `chown' function. */
69 /* Define to 1 if you have the `chroot' function. */
72 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
73 #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
75 /* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */
76 #undef HAVE_CRYPTO_THREADID_SET_CALLBACK
78 /* Define to 1 if you have the `ctime_r' function. */
81 /* Define to 1 if you have the `daemon' function. */
84 /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
86 #undef HAVE_DECL_ARC4RANDOM
88 /* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
90 #undef HAVE_DECL_ARC4RANDOM_UNIFORM
92 /* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if
94 #undef HAVE_DECL_EVSIGNAL_ASSIGN
96 /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
98 #undef HAVE_DECL_INET_NTOP
100 /* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
102 #undef HAVE_DECL_INET_PTON
104 /* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
106 #undef HAVE_DECL_NID_ED25519
108 /* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you
110 #undef HAVE_DECL_NID_ED448
112 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
114 #undef HAVE_DECL_NID_SECP384R1
116 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
118 #undef HAVE_DECL_NID_X9_62_PRIME256V1
120 /* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
122 #undef HAVE_DECL_REALLOCARRAY
124 /* Define to 1 if you have the declaration of `redisConnect', and to 0 if you
126 #undef HAVE_DECL_REDISCONNECT
128 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
130 #undef HAVE_DECL_SK_SSL_COMP_POP_FREE
132 /* Define to 1 if you have the declaration of
133 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
134 #undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
136 /* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
138 #undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO
140 /* Define to 1 if you have the declaration of `strlcat', and to 0 if you
142 #undef HAVE_DECL_STRLCAT
144 /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
146 #undef HAVE_DECL_STRLCPY
148 /* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
150 #undef HAVE_DECL_XML_STOPPARSER
152 /* Define to 1 if you have the <dlfcn.h> header file. */
155 /* Define to 1 if you have the `DSA_SIG_set0' function. */
156 #undef HAVE_DSA_SIG_SET0
158 /* Define to 1 if you have the <endian.h> header file. */
161 /* Define to 1 if you have the `endprotoent' function. */
162 #undef HAVE_ENDPROTOENT
164 /* Define to 1 if you have the `endpwent' function. */
167 /* Define to 1 if you have the `endservent' function. */
168 #undef HAVE_ENDSERVENT
170 /* Define to 1 if you have the `ERR_free_strings' function. */
171 #undef HAVE_ERR_FREE_STRINGS
173 /* Define to 1 if you have the `ERR_load_crypto_strings' function. */
174 #undef HAVE_ERR_LOAD_CRYPTO_STRINGS
176 /* Define to 1 if you have the `event_assign' function. */
177 #undef HAVE_EVENT_ASSIGN
179 /* Define to 1 if you have the `event_base_free' function. */
180 #undef HAVE_EVENT_BASE_FREE
182 /* Define to 1 if you have the `event_base_get_method' function. */
183 #undef HAVE_EVENT_BASE_GET_METHOD
185 /* Define to 1 if you have the `event_base_new' function. */
186 #undef HAVE_EVENT_BASE_NEW
188 /* Define to 1 if you have the `event_base_once' function. */
189 #undef HAVE_EVENT_BASE_ONCE
191 /* Define to 1 if you have the <event.h> header file. */
194 /* Define to 1 if you have the `EVP_aes_256_cbc' function. */
195 #undef HAVE_EVP_AES_256_CBC
197 /* Define to 1 if you have the `EVP_cleanup' function. */
198 #undef HAVE_EVP_CLEANUP
200 /* Define to 1 if you have the `EVP_DigestVerify' function. */
201 #undef HAVE_EVP_DIGESTVERIFY
203 /* Define to 1 if you have the `EVP_dss1' function. */
206 /* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
207 #undef HAVE_EVP_ENCRYPTINIT_EX
209 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
210 #undef HAVE_EVP_MD_CTX_NEW
212 /* Define to 1 if you have the `EVP_sha1' function. */
215 /* Define to 1 if you have the `EVP_sha256' function. */
216 #undef HAVE_EVP_SHA256
218 /* Define to 1 if you have the `EVP_sha512' function. */
219 #undef HAVE_EVP_SHA512
221 /* Define to 1 if you have the `ev_default_loop' function. */
222 #undef HAVE_EV_DEFAULT_LOOP
224 /* Define to 1 if you have the `ev_loop' function. */
227 /* Define to 1 if you have the <expat.h> header file. */
230 /* Define to 1 if you have the `explicit_bzero' function. */
231 #undef HAVE_EXPLICIT_BZERO
233 /* Define to 1 if you have the `fcntl' function. */
236 /* Define to 1 if you have the `FIPS_mode' function. */
237 #undef HAVE_FIPS_MODE
239 /* Define to 1 if you have the `fork' function. */
242 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
245 /* Define to 1 if you have the `fsync' function. */
248 /* Whether getaddrinfo is available */
249 #undef HAVE_GETADDRINFO
251 /* Define to 1 if you have the `getauxval' function. */
252 #undef HAVE_GETAUXVAL
254 /* Define to 1 if you have the `getentropy' function. */
255 #undef HAVE_GETENTROPY
257 /* Define to 1 if you have the <getopt.h> header file. */
260 /* Define to 1 if you have the `getpwnam' function. */
263 /* Define to 1 if you have the `getrlimit' function. */
264 #undef HAVE_GETRLIMIT
266 /* Define to 1 if you have the `glob' function. */
269 /* Define to 1 if you have the <glob.h> header file. */
272 /* Define to 1 if you have the `gmtime_r' function. */
275 /* Define to 1 if you have the <grp.h> header file. */
278 /* Define to 1 if you have the <hiredis/hiredis.h> header file. */
279 #undef HAVE_HIREDIS_HIREDIS_H
281 /* Define to 1 if you have the `HMAC_Init_ex' function. */
282 #undef HAVE_HMAC_INIT_EX
284 /* If you have HMAC_Update */
285 #undef HAVE_HMAC_UPDATE
287 /* Define to 1 if you have the `inet_aton' function. */
288 #undef HAVE_INET_ATON
290 /* Define to 1 if you have the `inet_ntop' function. */
291 #undef HAVE_INET_NTOP
293 /* Define to 1 if you have the `inet_pton' function. */
294 #undef HAVE_INET_PTON
296 /* Define to 1 if you have the `initgroups' function. */
297 #undef HAVE_INITGROUPS
299 /* Define to 1 if you have the <inttypes.h> header file. */
300 #undef HAVE_INTTYPES_H
302 /* if the function 'ioctlsocket' is available */
303 #undef HAVE_IOCTLSOCKET
305 /* Define to 1 if you have the <iphlpapi.h> header file. */
306 #undef HAVE_IPHLPAPI_H
308 /* Define to 1 if you have the `isblank' function. */
311 /* Define to 1 if you have the `kill' function. */
314 /* Define to 1 if you have the <libkern/OSByteOrder.h> header file. */
315 #undef HAVE_LIBKERN_OSBYTEORDER_H
317 /* Define if we have LibreSSL */
320 /* Define to 1 if you have the `localtime_r' function. */
321 #undef HAVE_LOCALTIME_R
323 /* Define to 1 if you have the <login_cap.h> header file. */
324 #undef HAVE_LOGIN_CAP_H
326 /* If have GNU libc compatible malloc */
329 /* Define to 1 if you have the `memmove' function. */
332 /* Define to 1 if you have the <memory.h> header file. */
335 /* Define to 1 if you have the <netdb.h> header file. */
338 /* Define to 1 if you have the <netinet/in.h> header file. */
339 #undef HAVE_NETINET_IN_H
341 /* Define to 1 if you have the <netinet/tcp.h> header file. */
342 #undef HAVE_NETINET_TCP_H
344 /* Use libnettle for crypto */
347 /* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
348 #undef HAVE_NETTLE_DSA_COMPAT_H
350 /* Define to 1 if you have the <nettle/eddsa.h> header file. */
351 #undef HAVE_NETTLE_EDDSA_H
353 /* Use libnss for crypto */
356 /* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
357 #undef HAVE_OPENSSL_ADD_ALL_DIGESTS
359 /* Define to 1 if you have the <openssl/bn.h> header file. */
360 #undef HAVE_OPENSSL_BN_H
362 /* Define to 1 if you have the `OPENSSL_config' function. */
363 #undef HAVE_OPENSSL_CONFIG
365 /* Define to 1 if you have the <openssl/conf.h> header file. */
366 #undef HAVE_OPENSSL_CONF_H
368 /* Define to 1 if you have the <openssl/dh.h> header file. */
369 #undef HAVE_OPENSSL_DH_H
371 /* Define to 1 if you have the <openssl/dsa.h> header file. */
372 #undef HAVE_OPENSSL_DSA_H
374 /* Define to 1 if you have the <openssl/engine.h> header file. */
375 #undef HAVE_OPENSSL_ENGINE_H
377 /* Define to 1 if you have the <openssl/err.h> header file. */
378 #undef HAVE_OPENSSL_ERR_H
380 /* Define to 1 if you have the `OPENSSL_init_crypto' function. */
381 #undef HAVE_OPENSSL_INIT_CRYPTO
383 /* Define to 1 if you have the `OPENSSL_init_ssl' function. */
384 #undef HAVE_OPENSSL_INIT_SSL
386 /* Define to 1 if you have the <openssl/rand.h> header file. */
387 #undef HAVE_OPENSSL_RAND_H
389 /* Define to 1 if you have the <openssl/rsa.h> header file. */
390 #undef HAVE_OPENSSL_RSA_H
392 /* Define to 1 if you have the <openssl/ssl.h> header file. */
393 #undef HAVE_OPENSSL_SSL_H
395 /* Define if you have POSIX threads libraries and header files. */
398 /* Have PTHREAD_PRIO_INHERIT. */
399 #undef HAVE_PTHREAD_PRIO_INHERIT
401 /* Define to 1 if the system has the type `pthread_rwlock_t'. */
402 #undef HAVE_PTHREAD_RWLOCK_T
404 /* Define to 1 if the system has the type `pthread_spinlock_t'. */
405 #undef HAVE_PTHREAD_SPINLOCK_T
407 /* Define to 1 if you have the <pwd.h> header file. */
410 /* Define if you have Python libraries and header files. */
413 /* Define to 1 if you have the `random' function. */
416 /* Define to 1 if you have the `RAND_cleanup' function. */
417 #undef HAVE_RAND_CLEANUP
419 /* If we have reallocarray(3) */
420 #undef HAVE_REALLOCARRAY
422 /* Define to 1 if you have the `recvmsg' function. */
425 /* Define to 1 if you have the `sendmsg' function. */
428 /* Define to 1 if you have the `setregid' function. */
431 /* Define to 1 if you have the `setresgid' function. */
432 #undef HAVE_SETRESGID
434 /* Define to 1 if you have the `setresuid' function. */
435 #undef HAVE_SETRESUID
437 /* Define to 1 if you have the `setreuid' function. */
440 /* Define to 1 if you have the `setrlimit' function. */
441 #undef HAVE_SETRLIMIT
443 /* Define to 1 if you have the `setsid' function. */
446 /* Define to 1 if you have the `setusercontext' function. */
447 #undef HAVE_SETUSERCONTEXT
449 /* Define to 1 if you have the `SHA512_Update' function. */
450 #undef HAVE_SHA512_UPDATE
452 /* Define to 1 if you have the `shmget' function. */
455 /* Define to 1 if you have the `sigprocmask' function. */
456 #undef HAVE_SIGPROCMASK
458 /* Define to 1 if you have the `sleep' function. */
461 /* Define to 1 if you have the `snprintf' function. */
464 /* Define to 1 if you have the `socketpair' function. */
465 #undef HAVE_SOCKETPAIR
467 /* Using Solaris threads */
468 #undef HAVE_SOLARIS_THREADS
470 /* Define to 1 if you have the `srandom' function. */
473 /* Define if you have the SSL libraries installed. */
476 /* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */
477 #undef HAVE_SSL_CTX_SET_CIPHERSUITES
479 /* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
480 #undef HAVE_SSL_CTX_SET_SECURITY_LEVEL
482 /* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_cb' function. */
483 #undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_CB
485 /* Define to 1 if you have the `SSL_get0_peername' function. */
486 #undef HAVE_SSL_GET0_PEERNAME
488 /* Define to 1 if you have the `SSL_set1_host' function. */
489 #undef HAVE_SSL_SET1_HOST
491 /* Define to 1 if you have the <stdarg.h> header file. */
494 /* Define to 1 if you have the <stdbool.h> header file. */
495 #undef HAVE_STDBOOL_H
497 /* Define to 1 if you have the <stdint.h> header file. */
500 /* Define to 1 if you have the <stdlib.h> header file. */
503 /* Define to 1 if you have the `strftime' function. */
506 /* Define to 1 if you have the <strings.h> header file. */
507 #undef HAVE_STRINGS_H
509 /* Define to 1 if you have the <string.h> header file. */
512 /* Define to 1 if you have the `strlcat' function. */
515 /* Define to 1 if you have the `strlcpy' function. */
518 /* Define to 1 if you have the `strptime' function. */
521 /* Define to 1 if you have the `strsep' function. */
524 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
525 #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
527 /* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
528 #undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
530 /* Define if you have Swig libraries and header files. */
533 /* Define to 1 if you have the <syslog.h> header file. */
536 /* Define to 1 if systemd should be used */
539 /* Define to 1 if you have the <sys/endian.h> header file. */
540 #undef HAVE_SYS_ENDIAN_H
542 /* Define to 1 if you have the <sys/ipc.h> header file. */
543 #undef HAVE_SYS_IPC_H
545 /* Define to 1 if you have the <sys/param.h> header file. */
546 #undef HAVE_SYS_PARAM_H
548 /* Define to 1 if you have the <sys/resource.h> header file. */
549 #undef HAVE_SYS_RESOURCE_H
551 /* Define to 1 if you have the <sys/sha2.h> header file. */
552 #undef HAVE_SYS_SHA2_H
554 /* Define to 1 if you have the <sys/shm.h> header file. */
555 #undef HAVE_SYS_SHM_H
557 /* Define to 1 if you have the <sys/socket.h> header file. */
558 #undef HAVE_SYS_SOCKET_H
560 /* Define to 1 if you have the <sys/stat.h> header file. */
561 #undef HAVE_SYS_STAT_H
563 /* Define to 1 if you have the <sys/sysctl.h> header file. */
564 #undef HAVE_SYS_SYSCTL_H
566 /* Define to 1 if you have the <sys/types.h> header file. */
567 #undef HAVE_SYS_TYPES_H
569 /* Define to 1 if you have the <sys/uio.h> header file. */
570 #undef HAVE_SYS_UIO_H
572 /* Define to 1 if you have the <sys/un.h> header file. */
575 /* Define to 1 if you have the <sys/wait.h> header file. */
576 #undef HAVE_SYS_WAIT_H
578 /* Define to 1 if you have the <time.h> header file. */
581 /* Define to 1 if you have the `tzset' function. */
584 /* Define to 1 if you have the <unistd.h> header file. */
587 /* Define to 1 if you have the `usleep' function. */
590 /* Define to 1 if you have the `vfork' function. */
593 /* Define to 1 if you have the <vfork.h> header file. */
596 /* Define to 1 if you have the <windows.h> header file. */
597 #undef HAVE_WINDOWS_H
599 /* Using Windows threads */
600 #undef HAVE_WINDOWS_THREADS
602 /* Define to 1 if you have the <winsock2.h> header file. */
603 #undef HAVE_WINSOCK2_H
605 /* Define to 1 if `fork' works. */
606 #undef HAVE_WORKING_FORK
608 /* Define to 1 if `vfork' works. */
609 #undef HAVE_WORKING_VFORK
611 /* Define to 1 if you have the `writev' function. */
614 /* Define to 1 if you have the <ws2tcpip.h> header file. */
615 #undef HAVE_WS2TCPIP_H
617 /* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */
618 #undef HAVE_X509_VERIFY_PARAM_SET1_HOST
620 /* Define to 1 if you have the `_beginthreadex' function. */
621 #undef HAVE__BEGINTHREADEX
623 /* If HMAC_Init_ex() returns void */
624 #undef HMAC_INIT_EX_RETURNS_VOID
626 /* if lex has yylex_destroy */
627 #undef LEX_HAS_YYLEX_DESTROY
629 /* Define to the sub-directory where libtool stores uninstalled libraries. */
632 /* Define to the maximum message length to pass to syslog. */
633 #undef MAXSYSLOGMSGLEN
635 /* Define if memcmp() does not compare unsigned bytes */
636 #undef MEMCMP_IS_BROKEN
638 /* Define if mkdir has one argument. */
639 #undef MKDIR_HAS_ONE_ARG
641 /* Define if the network stack does not fully support nonblocking io (causes
642 lower performance). */
643 #undef NONBLOCKING_IS_BROKEN
645 /* Put -D_ALL_SOURCE define in config.h */
646 #undef OMITTED__D_ALL_SOURCE
648 /* Put -D_BSD_SOURCE define in config.h */
649 #undef OMITTED__D_BSD_SOURCE
651 /* Put -D_DEFAULT_SOURCE define in config.h */
652 #undef OMITTED__D_DEFAULT_SOURCE
654 /* Put -D_GNU_SOURCE define in config.h */
655 #undef OMITTED__D_GNU_SOURCE
657 /* Put -D_LARGEFILE_SOURCE=1 define in config.h */
658 #undef OMITTED__D_LARGEFILE_SOURCE_1
660 /* Put -D_POSIX_C_SOURCE=200112 define in config.h */
661 #undef OMITTED__D_POSIX_C_SOURCE_200112
663 /* Put -D_XOPEN_SOURCE=600 define in config.h */
664 #undef OMITTED__D_XOPEN_SOURCE_600
666 /* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
667 #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1
669 /* Put -D__EXTENSIONS__ define in config.h */
670 #undef OMITTED__D__EXTENSIONS__
672 /* Define to the address where bug reports for this package should be sent. */
673 #undef PACKAGE_BUGREPORT
675 /* Define to the full name of this package. */
678 /* Define to the full name and version of this package. */
679 #undef PACKAGE_STRING
681 /* Define to the one symbol short name of this package. */
682 #undef PACKAGE_TARNAME
684 /* Define to the home page for this package. */
687 /* Define to the version of this package. */
688 #undef PACKAGE_VERSION
690 /* default pidfile location */
693 /* Define to necessary symbol if this constant uses a non-standard name on
695 #undef PTHREAD_CREATE_JOINABLE
697 /* Define as the return type of signal handlers (`int' or `void'). */
700 /* if REUSEPORT is enabled by default */
701 #undef REUSEPORT_DEFAULT
703 /* default rootkey location */
704 #undef ROOT_ANCHOR_FILE
706 /* default rootcert location */
707 #undef ROOT_CERT_FILE
709 /* version number for resource files */
710 #undef RSRC_PACKAGE_VERSION
712 /* Directory to chdir to */
718 /* The size of `size_t', as computed by sizeof. */
721 /* The size of `time_t', as computed by sizeof. */
724 /* define if (v)snprintf does not return length needed, (but length used) */
725 #undef SNPRINTF_RET_BROKEN
727 /* Define to 1 if libsodium supports sodium_set_misuse_handler */
728 #undef SODIUM_MISUSE_HANDLER
730 /* Define to 1 if you have the ANSI C header files. */
733 /* use default strptime. */
734 #undef STRPTIME_WORKS
736 /* Use win32 resources and API */
739 /* the SYSLOG_FACILITY to use, default LOG_DAEMON */
740 #undef UB_SYSLOG_FACILITY
742 /* default username */
745 /* use to enable lightweight alloc assertions, for debug use */
746 #undef UNBOUND_ALLOC_LITE
748 /* use malloc not regions, for debug use */
749 #undef UNBOUND_ALLOC_NONREGIONAL
751 /* use statistics for allocs and frees, for debug use */
752 #undef UNBOUND_ALLOC_STATS
754 /* define this to enable debug checks. */
757 /* Define to 1 to use cachedb support */
760 /* Define to 1 to enable dnscrypt support */
763 /* Define to 1 to enable dnscrypt with xchacha20 support */
764 #undef USE_DNSCRYPT_XCHACHA20
766 /* Define to 1 to enable dnstap support */
769 /* Define this to enable DSA support. */
772 /* Define this to enable ECDSA support. */
775 /* Define this to enable an EVP workaround for older openssl */
776 #undef USE_ECDSA_EVP_WORKAROUND
778 /* Define this to enable ED25519 support. */
781 /* Define this to enable ED448 support. */
784 /* Define this to enable GOST support. */
787 /* Define to 1 to use ipsecmod support. */
790 /* Define to 1 to use ipset support */
793 /* Define if you want to use internal select based events */
794 #undef USE_MINI_EVENT
796 /* Define this to enable client TCP Fast Open. */
797 #undef USE_MSG_FASTOPEN
799 /* Define this to enable client TCP Fast Open. */
800 #undef USE_OSX_MSG_FASTOPEN
802 /* Define this to use hiredis client. */
805 /* Define this to enable SHA1 support. */
808 /* Define this to enable SHA256 and SHA512 support. */
811 /* Enable extensions on AIX 3, Interix. */
815 /* Enable GNU extensions on systems that have them. */
819 /* Enable threading extensions on Solaris. */
820 #ifndef _POSIX_PTHREAD_SEMANTICS
821 # undef _POSIX_PTHREAD_SEMANTICS
823 /* Enable extensions on HP NonStop. */
824 #ifndef _TANDEM_SOURCE
825 # undef _TANDEM_SOURCE
827 /* Enable general extensions on Solaris. */
828 #ifndef __EXTENSIONS__
829 # undef __EXTENSIONS__
833 /* Define this to enable server TCP Fast Open. */
834 #undef USE_TCP_FASTOPEN
836 /* Whether the windows socket API is used */
839 /* the version of the windows API enabled */
842 /* Define if you want Python module. */
843 #undef WITH_PYTHONMODULE
845 /* Define if you want PyUnbound. */
846 #undef WITH_PYUNBOUND
848 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
850 #undef YYTEXT_POINTER
852 /* Enable large inode numbers on Mac OS X 10.5. */
853 #ifndef _DARWIN_USE_64_BIT_INODE
854 # define _DARWIN_USE_64_BIT_INODE 1
857 /* Number of bits in a file offset, on hosts where this is settable. */
858 #undef _FILE_OFFSET_BITS
860 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
861 #undef _LARGEFILE_SOURCE
863 /* Define for large files, on AIX-style hosts. */
866 /* Define to 1 if on MINIX. */
869 /* Enable for compile on Minix */
870 #undef _NETBSD_SOURCE
872 /* Define to 2 if the system does not provide POSIX.1 features except with
874 #undef _POSIX_1_SOURCE
876 /* Define to 1 if you need to in order for `stat' and other things to work. */
879 /* Define to empty if `const' does not conform to ANSI C. */
882 /* Define to `int' if <sys/types.h> doesn't define. */
891 /* Define to `__inline__' or `__inline' if that's what the C compiler
892 calls it, or to nothing if 'inline' is not supported under any name. */
897 /* Define to `short' if <sys/types.h> does not define. */
900 /* Define to `int' if <sys/types.h> does not define. */
903 /* Define to `long long' if <sys/types.h> does not define. */
906 /* Define to `signed char' if <sys/types.h> does not define. */
909 /* Define if replacement function should be used. */
912 /* Define to `long int' if <sys/types.h> does not define. */
915 /* Define to `int' if <sys/types.h> does not define. */
918 /* Define to 'int' if not defined */
921 /* Define to `unsigned int' if <sys/types.h> does not define. */
924 /* Define to 'int' if not defined */
927 /* Define to `int' if <sys/types.h> does not define. */
930 /* Define to 'unsigned char if not defined */
933 /* Define to `int' if <sys/types.h> doesn't define. */
936 /* Define to `unsigned short' if <sys/types.h> does not define. */
939 /* Define to `unsigned int' if <sys/types.h> does not define. */
942 /* Define to `unsigned long long' if <sys/types.h> does not define. */
945 /* Define to `unsigned char' if <sys/types.h> does not define. */
948 /* Define as `fork' if `vfork' does not work. */
951 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
952 #define _GNU_SOURCE 1
955 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
956 #define _BSD_SOURCE 1
959 #if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
960 #define _DEFAULT_SOURCE 1
963 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
964 #define __EXTENSIONS__ 1
967 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
968 #define _POSIX_C_SOURCE 200112
971 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
972 #define _XOPEN_SOURCE 600
975 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
976 #define _XOPEN_SOURCE_EXTENDED 1
979 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
980 #define _ALL_SOURCE 1
983 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
984 #define _LARGEFILE_SOURCE 1
990 #ifndef _OPENBSD_SOURCE
991 #define _OPENBSD_SOURCE 1
994 #ifndef UNBOUND_DEBUG
1000 /** Use small-ldns codebase */
1003 # define LDNS_BUILD_CONFIG_HAVE_SSL 1
1016 #ifdef HAVE_STDARG_H
1020 #ifdef HAVE_STDINT_H
1026 #if HAVE_SYS_PARAM_H
1027 #include <sys/param.h>
1030 #ifdef HAVE_SYS_SOCKET_H
1031 #include <sys/socket.h>
1034 #ifdef HAVE_SYS_UIO_H
1035 #include <sys/uio.h>
1038 #ifdef HAVE_NETINET_IN_H
1039 #include <netinet/in.h>
1042 #ifdef HAVE_NETINET_TCP_H
1043 #include <netinet/tcp.h>
1046 #ifdef HAVE_ARPA_INET_H
1047 #include <arpa/inet.h>
1050 #ifdef HAVE_WINSOCK2_H
1051 #include <winsock2.h>
1054 #ifdef HAVE_WS2TCPIP_H
1055 #include <ws2tcpip.h>
1059 #define ARG_LL "%ll"
1061 #define ARG_LL "%I64"
1065 #define AF_LOCAL AF_UNIX
1070 #ifdef HAVE_ATTR_FORMAT
1071 # define ATTR_FORMAT(archetype, string_index, first_to_check) \
1072 __attribute__ ((format (archetype, string_index, first_to_check)))
1073 #else /* !HAVE_ATTR_FORMAT */
1074 # define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
1075 #endif /* !HAVE_ATTR_FORMAT */
1078 #if defined(DOXYGEN)
1079 # define ATTR_UNUSED(x) x
1080 #elif defined(__cplusplus)
1081 # define ATTR_UNUSED(x)
1082 #elif defined(HAVE_ATTR_UNUSED)
1083 # define ATTR_UNUSED(x) x __attribute__((unused))
1084 #else /* !HAVE_ATTR_UNUSED */
1085 # define ATTR_UNUSED(x) x
1086 #endif /* !HAVE_ATTR_UNUSED */
1090 #define fseeko fseek
1091 #define ftello ftell
1092 #endif /* HAVE_FSEEKO */
1095 #ifndef MAXHOSTNAMELEN
1096 #define MAXHOSTNAMELEN 256
1099 #if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
1100 #define snprintf snprintf_unbound
1101 #define vsnprintf vsnprintf_unbound
1103 int snprintf (char *str, size_t count, const char *fmt, ...);
1104 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
1105 #endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
1107 #ifndef HAVE_INET_PTON
1108 #define inet_pton inet_pton_unbound
1109 int inet_pton(int af, const char* src, void* dst);
1110 #endif /* HAVE_INET_PTON */
1113 #ifndef HAVE_INET_NTOP
1114 #define inet_ntop inet_ntop_unbound
1115 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1119 #ifndef HAVE_INET_ATON
1120 #define inet_aton inet_aton_unbound
1121 int inet_aton(const char *cp, struct in_addr *addr);
1125 #ifndef HAVE_MEMMOVE
1126 #define memmove memmove_unbound
1127 void *memmove(void *dest, const void *src, size_t n);
1131 #ifndef HAVE_STRLCAT
1132 #define strlcat strlcat_unbound
1133 size_t strlcat(char *dst, const char *src, size_t siz);
1137 #ifndef HAVE_STRLCPY
1138 #define strlcpy strlcpy_unbound
1139 size_t strlcpy(char *dst, const char *src, size_t siz);
1143 #ifndef HAVE_GMTIME_R
1144 #define gmtime_r gmtime_r_unbound
1145 struct tm *gmtime_r(const time_t *timep, struct tm *result);
1149 #ifndef HAVE_REALLOCARRAY
1150 #define reallocarray reallocarrayunbound
1151 void* reallocarray(void *ptr, size_t nmemb, size_t size);
1155 #if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1156 #define sleep(x) Sleep((x)*1000) /* on win32 */
1157 #endif /* HAVE_SLEEP */
1161 #define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1162 #endif /* HAVE_USLEEP */
1166 #define random rand /* on win32, for tests only (bad random) */
1167 #endif /* HAVE_RANDOM */
1170 #ifndef HAVE_SRANDOM
1171 #define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1172 #endif /* HAVE_SRANDOM */
1175 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1176 #ifdef HAVE_WINSOCK2_H
1177 #define FD_SET_T (u_int)
1183 #ifndef IPV6_MIN_MTU
1184 #define IPV6_MIN_MTU 1280
1185 #endif /* IPV6_MIN_MTU */
1188 #ifdef MEMCMP_IS_BROKEN
1189 #include "compat/memcmp.h"
1190 #define memcmp memcmp_unbound
1191 int memcmp(const void *x, const void *y, size_t n);
1196 #ifndef HAVE_CTIME_R
1197 #define ctime_r unbound_ctime_r
1198 char *ctime_r(const time_t *timep, char *buf);
1202 #define strsep unbound_strsep
1203 char *strsep(char **stringp, const char *delim);
1206 #ifndef HAVE_ISBLANK
1207 #define isblank unbound_isblank
1211 #ifndef HAVE_EXPLICIT_BZERO
1212 #define explicit_bzero unbound_explicit_bzero
1213 void explicit_bzero(void* buf, size_t len);
1216 #if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
1217 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1220 #if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
1221 int inet_pton(int af, const char* src, void* dst);
1224 #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1225 #define strptime unbound_strptime
1227 char *strptime(const char *s, const char *format, struct tm *tm);
1230 #if !HAVE_DECL_REALLOCARRAY
1231 void *reallocarray(void *ptr, size_t nmemb, size_t size);
1234 #ifdef HAVE_LIBRESSL
1235 # if !HAVE_DECL_STRLCPY
1236 size_t strlcpy(char *dst, const char *src, size_t siz);
1238 # if !HAVE_DECL_STRLCAT
1239 size_t strlcat(char *dst, const char *src, size_t siz);
1241 # if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1242 uint32_t arc4random(void);
1244 # if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1245 uint32_t arc4random_uniform(uint32_t upper_bound);
1247 #endif /* HAVE_LIBRESSL */
1248 #ifndef HAVE_ARC4RANDOM
1249 int getentropy(void* buf, size_t len);
1250 uint32_t arc4random(void);
1251 void arc4random_buf(void* buf, size_t n);
1252 void _ARC4_LOCK(void);
1253 void _ARC4_UNLOCK(void);
1254 void _ARC4_LOCK_DESTROY(void);
1256 #ifndef HAVE_ARC4RANDOM_UNIFORM
1257 uint32_t arc4random_uniform(uint32_t upper_bound);
1259 #ifdef COMPAT_SHA512
1260 #ifndef SHA512_DIGEST_LENGTH
1261 #define SHA512_BLOCK_LENGTH 128
1262 #define SHA512_DIGEST_LENGTH 64
1263 #define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
1264 typedef struct _SHA512_CTX {
1266 uint64_t bitcount[2];
1267 uint8_t buffer[SHA512_BLOCK_LENGTH];
1269 #endif /* SHA512_DIGEST_LENGTH */
1270 void SHA512_Init(SHA512_CTX*);
1271 void SHA512_Update(SHA512_CTX*, void*, size_t);
1272 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1273 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1274 #endif /* COMPAT_SHA512 */
1278 #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))
1279 /* using version of libevent that is not threadsafe. */
1280 # define LIBEVENT_SIGNAL_PROBLEM 1
1283 #ifndef CHECKED_INET6
1284 # define CHECKED_INET6
1288 # define AF_INET6 28
1290 #endif /* CHECKED_INET6 */
1292 #ifndef HAVE_GETADDRINFO
1293 struct sockaddr_storage;
1294 #include "compat/fake-rfc2553.h"
1297 #ifdef UNBOUND_ALLOC_STATS
1298 # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1299 # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1300 # define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1301 # define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1302 void *unbound_stat_malloc(size_t size);
1303 void *unbound_stat_calloc(size_t nmemb, size_t size);
1304 void unbound_stat_free(void *ptr);
1305 void *unbound_stat_realloc(void *ptr, size_t size);
1306 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1308 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1309 int line, const char* func);
1310 void unbound_stat_free_log(void *ptr, const char* file, int line,
1312 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1313 int line, const char* func);
1314 #elif defined(UNBOUND_ALLOC_LITE)
1315 # include "util/alloc.h"
1316 #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1318 /** default port for DNS traffic. */
1319 #define UNBOUND_DNS_PORT 53
1320 /** default port for DNS over TLS traffic. */
1321 #define UNBOUND_DNS_OVER_TLS_PORT 853
1322 /** default port for unbound control traffic, registered port with IANA,
1323 ub-dns-control 8953/tcp unbound dns nameserver control */
1324 #define UNBOUND_CONTROL_PORT 8953
1325 /** the version of unbound-control that this software implements */
1326 #define UNBOUND_CONTROL_VERSION 1