1 /* config.h.in. Generated from configure.ac by autoheader. */
3 /* Directory to chroot to */
6 /* Define this to enable client subnet option. */
9 /* Do sha512 definitions in config.h */
12 /* Pathname to the Unbound configuration file */
15 /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
17 #undef DARWIN_BROKEN_SETREUID
19 /* Whether daemon is deprecated */
20 #undef DEPRECATED_DAEMON
22 /* default dnstap socket path */
23 #undef DNSTAP_SOCKET_PATH
25 /* Define if you want to use debug lock checking (slow). */
26 #undef ENABLE_LOCK_CHECKS
28 /* Define this if you enabled-allsymbols from libunbound to link binaries to
29 it for smaller install size, but the libunbound export table is polluted by
31 #undef EXPORT_ALL_SYMBOLS
33 /* Define to 1 if you have the `accept4' function. */
36 /* Define to 1 if you have the `arc4random' function. */
37 #undef HAVE_ARC4RANDOM
39 /* Define to 1 if you have the `arc4random_uniform' function. */
40 #undef HAVE_ARC4RANDOM_UNIFORM
42 /* Define to 1 if you have the <arpa/inet.h> header file. */
43 #undef HAVE_ARPA_INET_H
45 /* Whether the C compiler accepts the "format" attribute */
46 #undef HAVE_ATTR_FORMAT
48 /* Whether the C compiler accepts the "unused" attribute */
49 #undef HAVE_ATTR_UNUSED
51 /* Whether the C compiler accepts the "weak" attribute */
54 /* Define to 1 if you have the `chown' function. */
57 /* Define to 1 if you have the `chroot' function. */
60 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
61 #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
63 /* Define to 1 if you have the `ctime_r' function. */
66 /* Define to 1 if you have the `daemon' function. */
69 /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
71 #undef HAVE_DECL_ARC4RANDOM
73 /* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
75 #undef HAVE_DECL_ARC4RANDOM_UNIFORM
77 /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
79 #undef HAVE_DECL_INET_NTOP
81 /* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
83 #undef HAVE_DECL_INET_PTON
85 /* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
87 #undef HAVE_DECL_NID_ED25519
89 /* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you
91 #undef HAVE_DECL_NID_ED448
93 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
95 #undef HAVE_DECL_NID_SECP384R1
97 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
99 #undef HAVE_DECL_NID_X9_62_PRIME256V1
101 /* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
103 #undef HAVE_DECL_REALLOCARRAY
105 /* Define to 1 if you have the declaration of `redisConnect', and to 0 if you
107 #undef HAVE_DECL_REDISCONNECT
109 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
111 #undef HAVE_DECL_SK_SSL_COMP_POP_FREE
113 /* Define to 1 if you have the declaration of
114 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
115 #undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
117 /* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
119 #undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO
121 /* Define to 1 if you have the declaration of `strlcat', and to 0 if you
123 #undef HAVE_DECL_STRLCAT
125 /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
127 #undef HAVE_DECL_STRLCPY
129 /* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
131 #undef HAVE_DECL_XML_STOPPARSER
133 /* Define to 1 if you have the <dlfcn.h> header file. */
136 /* Define to 1 if you have the `DSA_SIG_set0' function. */
137 #undef HAVE_DSA_SIG_SET0
139 /* Define to 1 if you have the <endian.h> header file. */
142 /* Define to 1 if you have the `endprotoent' function. */
143 #undef HAVE_ENDPROTOENT
145 /* Define to 1 if you have the `endpwent' function. */
148 /* Define to 1 if you have the `endservent' function. */
149 #undef HAVE_ENDSERVENT
151 /* Define to 1 if you have the `ERR_free_strings' function. */
152 #undef HAVE_ERR_FREE_STRINGS
154 /* Define to 1 if you have the `ERR_load_crypto_strings' function. */
155 #undef HAVE_ERR_LOAD_CRYPTO_STRINGS
157 /* Define to 1 if you have the `event_base_free' function. */
158 #undef HAVE_EVENT_BASE_FREE
160 /* Define to 1 if you have the `event_base_get_method' function. */
161 #undef HAVE_EVENT_BASE_GET_METHOD
163 /* Define to 1 if you have the `event_base_new' function. */
164 #undef HAVE_EVENT_BASE_NEW
166 /* Define to 1 if you have the `event_base_once' function. */
167 #undef HAVE_EVENT_BASE_ONCE
169 /* Define to 1 if you have the <event.h> header file. */
172 /* Define to 1 if you have the `EVP_cleanup' function. */
173 #undef HAVE_EVP_CLEANUP
175 /* Define to 1 if you have the `EVP_DigestVerify' function. */
176 #undef HAVE_EVP_DIGESTVERIFY
178 /* Define to 1 if you have the `EVP_dss1' function. */
181 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
182 #undef HAVE_EVP_MD_CTX_NEW
184 /* Define to 1 if you have the `EVP_sha1' function. */
187 /* Define to 1 if you have the `EVP_sha256' function. */
188 #undef HAVE_EVP_SHA256
190 /* Define to 1 if you have the `EVP_sha512' function. */
191 #undef HAVE_EVP_SHA512
193 /* Define to 1 if you have the `ev_default_loop' function. */
194 #undef HAVE_EV_DEFAULT_LOOP
196 /* Define to 1 if you have the `ev_loop' function. */
199 /* Define to 1 if you have the <expat.h> header file. */
202 /* Define to 1 if you have the `fcntl' function. */
205 /* Define to 1 if you have the `FIPS_mode' function. */
206 #undef HAVE_FIPS_MODE
208 /* Define to 1 if you have the `fork' function. */
211 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
214 /* Define to 1 if you have the `fsync' function. */
217 /* Whether getaddrinfo is available */
218 #undef HAVE_GETADDRINFO
220 /* Define to 1 if you have the `getauxval' function. */
221 #undef HAVE_GETAUXVAL
223 /* Define to 1 if you have the `getentropy' function. */
224 #undef HAVE_GETENTROPY
226 /* Define to 1 if you have the <getopt.h> header file. */
229 /* Define to 1 if you have the `getpwnam' function. */
232 /* Define to 1 if you have the `getrlimit' function. */
233 #undef HAVE_GETRLIMIT
235 /* Define to 1 if you have the `glob' function. */
238 /* Define to 1 if you have the <glob.h> header file. */
241 /* Define to 1 if you have the `gmtime_r' function. */
244 /* Define to 1 if you have the <grp.h> header file. */
247 /* Define to 1 if you have the <hiredis/hiredis.h> header file. */
248 #undef HAVE_HIREDIS_HIREDIS_H
250 /* If you have HMAC_Update */
251 #undef HAVE_HMAC_UPDATE
253 /* Define to 1 if you have the `inet_aton' function. */
254 #undef HAVE_INET_ATON
256 /* Define to 1 if you have the `inet_ntop' function. */
257 #undef HAVE_INET_NTOP
259 /* Define to 1 if you have the `inet_pton' function. */
260 #undef HAVE_INET_PTON
262 /* Define to 1 if you have the `initgroups' function. */
263 #undef HAVE_INITGROUPS
265 /* Define to 1 if you have the <inttypes.h> header file. */
266 #undef HAVE_INTTYPES_H
268 /* if the function 'ioctlsocket' is available */
269 #undef HAVE_IOCTLSOCKET
271 /* Define to 1 if you have the <iphlpapi.h> header file. */
272 #undef HAVE_IPHLPAPI_H
274 /* Define to 1 if you have the `isblank' function. */
277 /* Define to 1 if you have the `kill' function. */
280 /* Define to 1 if you have the <libkern/OSByteOrder.h> header file. */
281 #undef HAVE_LIBKERN_OSBYTEORDER_H
283 /* Define if we have LibreSSL */
286 /* Define to 1 if you have the `localtime_r' function. */
287 #undef HAVE_LOCALTIME_R
289 /* Define to 1 if you have the <login_cap.h> header file. */
290 #undef HAVE_LOGIN_CAP_H
292 /* If have GNU libc compatible malloc */
295 /* Define to 1 if you have the `memmove' function. */
298 /* Define to 1 if you have the <memory.h> header file. */
301 /* Define to 1 if you have the <netdb.h> header file. */
304 /* Define to 1 if you have the <netinet/in.h> header file. */
305 #undef HAVE_NETINET_IN_H
307 /* Define to 1 if you have the <netinet/tcp.h> header file. */
308 #undef HAVE_NETINET_TCP_H
310 /* Use libnettle for crypto */
313 /* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
314 #undef HAVE_NETTLE_DSA_COMPAT_H
316 /* Define to 1 if you have the <nettle/eddsa.h> header file. */
317 #undef HAVE_NETTLE_EDDSA_H
319 /* Use libnss for crypto */
322 /* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
323 #undef HAVE_OPENSSL_ADD_ALL_DIGESTS
325 /* Define to 1 if you have the <openssl/bn.h> header file. */
326 #undef HAVE_OPENSSL_BN_H
328 /* Define to 1 if you have the `OPENSSL_config' function. */
329 #undef HAVE_OPENSSL_CONFIG
331 /* Define to 1 if you have the <openssl/conf.h> header file. */
332 #undef HAVE_OPENSSL_CONF_H
334 /* Define to 1 if you have the <openssl/dh.h> header file. */
335 #undef HAVE_OPENSSL_DH_H
337 /* Define to 1 if you have the <openssl/dsa.h> header file. */
338 #undef HAVE_OPENSSL_DSA_H
340 /* Define to 1 if you have the <openssl/engine.h> header file. */
341 #undef HAVE_OPENSSL_ENGINE_H
343 /* Define to 1 if you have the <openssl/err.h> header file. */
344 #undef HAVE_OPENSSL_ERR_H
346 /* Define to 1 if you have the `OPENSSL_init_crypto' function. */
347 #undef HAVE_OPENSSL_INIT_CRYPTO
349 /* Define to 1 if you have the `OPENSSL_init_ssl' function. */
350 #undef HAVE_OPENSSL_INIT_SSL
352 /* Define to 1 if you have the <openssl/rand.h> header file. */
353 #undef HAVE_OPENSSL_RAND_H
355 /* Define to 1 if you have the <openssl/rsa.h> header file. */
356 #undef HAVE_OPENSSL_RSA_H
358 /* Define to 1 if you have the <openssl/ssl.h> header file. */
359 #undef HAVE_OPENSSL_SSL_H
361 /* Define if you have POSIX threads libraries and header files. */
364 /* Have PTHREAD_PRIO_INHERIT. */
365 #undef HAVE_PTHREAD_PRIO_INHERIT
367 /* Define to 1 if the system has the type `pthread_rwlock_t'. */
368 #undef HAVE_PTHREAD_RWLOCK_T
370 /* Define to 1 if the system has the type `pthread_spinlock_t'. */
371 #undef HAVE_PTHREAD_SPINLOCK_T
373 /* Define to 1 if you have the <pwd.h> header file. */
376 /* Define if you have Python libraries and header files. */
379 /* Define to 1 if you have the `random' function. */
382 /* Define to 1 if you have the `RAND_cleanup' function. */
383 #undef HAVE_RAND_CLEANUP
385 /* Define to 1 if you have the `reallocarray' function. */
386 #undef HAVE_REALLOCARRAY
388 /* Define to 1 if you have the `recvmsg' function. */
391 /* Define to 1 if you have the `sendmsg' function. */
394 /* Define to 1 if you have the `setregid' function. */
397 /* Define to 1 if you have the `setresgid' function. */
398 #undef HAVE_SETRESGID
400 /* Define to 1 if you have the `setresuid' function. */
401 #undef HAVE_SETRESUID
403 /* Define to 1 if you have the `setreuid' function. */
406 /* Define to 1 if you have the `setrlimit' function. */
407 #undef HAVE_SETRLIMIT
409 /* Define to 1 if you have the `setsid' function. */
412 /* Define to 1 if you have the `setusercontext' function. */
413 #undef HAVE_SETUSERCONTEXT
415 /* Define to 1 if you have the `SHA512_Update' function. */
416 #undef HAVE_SHA512_UPDATE
418 /* Define to 1 if you have the `shmget' function. */
421 /* Define to 1 if you have the `sigprocmask' function. */
422 #undef HAVE_SIGPROCMASK
424 /* Define to 1 if you have the `sleep' function. */
427 /* Define to 1 if you have the `snprintf' function. */
430 /* Define to 1 if you have the `socketpair' function. */
431 #undef HAVE_SOCKETPAIR
433 /* Using Solaris threads */
434 #undef HAVE_SOLARIS_THREADS
436 /* Define to 1 if you have the `srandom' function. */
439 /* Define if you have the SSL libraries installed. */
442 /* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
443 #undef HAVE_SSL_CTX_SET_SECURITY_LEVEL
445 /* Define to 1 if you have the `SSL_get0_peername' function. */
446 #undef HAVE_SSL_GET0_PEERNAME
448 /* Define to 1 if you have the `SSL_set1_host' function. */
449 #undef HAVE_SSL_SET1_HOST
451 /* Define to 1 if you have the <stdarg.h> header file. */
454 /* Define to 1 if you have the <stdbool.h> header file. */
455 #undef HAVE_STDBOOL_H
457 /* Define to 1 if you have the <stdint.h> header file. */
460 /* Define to 1 if you have the <stdlib.h> header file. */
463 /* Define to 1 if you have the `strftime' function. */
466 /* Define to 1 if you have the <strings.h> header file. */
467 #undef HAVE_STRINGS_H
469 /* Define to 1 if you have the <string.h> header file. */
472 /* Define to 1 if you have the `strlcat' function. */
475 /* Define to 1 if you have the `strlcpy' function. */
478 /* Define to 1 if you have the `strptime' function. */
481 /* Define to 1 if you have the `strsep' function. */
484 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
485 #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
487 /* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
488 #undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
490 /* Define if you have Swig libraries and header files. */
493 /* Define to 1 if you have the <syslog.h> header file. */
496 /* Define to 1 if systemd should be used */
499 /* Define to 1 if you have the <sys/endian.h> header file. */
500 #undef HAVE_SYS_ENDIAN_H
502 /* Define to 1 if you have the <sys/ipc.h> header file. */
503 #undef HAVE_SYS_IPC_H
505 /* Define to 1 if you have the <sys/param.h> header file. */
506 #undef HAVE_SYS_PARAM_H
508 /* Define to 1 if you have the <sys/resource.h> header file. */
509 #undef HAVE_SYS_RESOURCE_H
511 /* Define to 1 if you have the <sys/sha2.h> header file. */
512 #undef HAVE_SYS_SHA2_H
514 /* Define to 1 if you have the <sys/shm.h> header file. */
515 #undef HAVE_SYS_SHM_H
517 /* Define to 1 if you have the <sys/socket.h> header file. */
518 #undef HAVE_SYS_SOCKET_H
520 /* Define to 1 if you have the <sys/stat.h> header file. */
521 #undef HAVE_SYS_STAT_H
523 /* Define to 1 if you have the <sys/sysctl.h> header file. */
524 #undef HAVE_SYS_SYSCTL_H
526 /* Define to 1 if you have the <sys/types.h> header file. */
527 #undef HAVE_SYS_TYPES_H
529 /* Define to 1 if you have the <sys/uio.h> header file. */
530 #undef HAVE_SYS_UIO_H
532 /* Define to 1 if you have the <sys/un.h> header file. */
535 /* Define to 1 if you have the <sys/wait.h> header file. */
536 #undef HAVE_SYS_WAIT_H
538 /* Define to 1 if you have the <time.h> header file. */
541 /* Define to 1 if you have the `tzset' function. */
544 /* Define to 1 if you have the <unistd.h> header file. */
547 /* Define to 1 if you have the `usleep' function. */
550 /* Define to 1 if you have the `vfork' function. */
553 /* Define to 1 if you have the <vfork.h> header file. */
556 /* Define to 1 if you have the <windows.h> header file. */
557 #undef HAVE_WINDOWS_H
559 /* Using Windows threads */
560 #undef HAVE_WINDOWS_THREADS
562 /* Define to 1 if you have the <winsock2.h> header file. */
563 #undef HAVE_WINSOCK2_H
565 /* Define to 1 if `fork' works. */
566 #undef HAVE_WORKING_FORK
568 /* Define to 1 if `vfork' works. */
569 #undef HAVE_WORKING_VFORK
571 /* Define to 1 if you have the `writev' function. */
574 /* Define to 1 if you have the <ws2tcpip.h> header file. */
575 #undef HAVE_WS2TCPIP_H
577 /* Define to 1 if you have the `_beginthreadex' function. */
578 #undef HAVE__BEGINTHREADEX
580 /* if lex has yylex_destroy */
581 #undef LEX_HAS_YYLEX_DESTROY
583 /* Define to the sub-directory where libtool stores uninstalled libraries. */
586 /* Define to the maximum message length to pass to syslog. */
587 #undef MAXSYSLOGMSGLEN
589 /* Define if memcmp() does not compare unsigned bytes */
590 #undef MEMCMP_IS_BROKEN
592 /* Define if mkdir has one argument. */
593 #undef MKDIR_HAS_ONE_ARG
595 /* Define if the network stack does not fully support nonblocking io (causes
596 lower performance). */
597 #undef NONBLOCKING_IS_BROKEN
599 /* Put -D_ALL_SOURCE define in config.h */
600 #undef OMITTED__D_ALL_SOURCE
602 /* Put -D_BSD_SOURCE define in config.h */
603 #undef OMITTED__D_BSD_SOURCE
605 /* Put -D_DEFAULT_SOURCE define in config.h */
606 #undef OMITTED__D_DEFAULT_SOURCE
608 /* Put -D_GNU_SOURCE define in config.h */
609 #undef OMITTED__D_GNU_SOURCE
611 /* Put -D_LARGEFILE_SOURCE=1 define in config.h */
612 #undef OMITTED__D_LARGEFILE_SOURCE_1
614 /* Put -D_POSIX_C_SOURCE=200112 define in config.h */
615 #undef OMITTED__D_POSIX_C_SOURCE_200112
617 /* Put -D_XOPEN_SOURCE=600 define in config.h */
618 #undef OMITTED__D_XOPEN_SOURCE_600
620 /* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
621 #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1
623 /* Put -D__EXTENSIONS__ define in config.h */
624 #undef OMITTED__D__EXTENSIONS__
626 /* Define to the address where bug reports for this package should be sent. */
627 #undef PACKAGE_BUGREPORT
629 /* Define to the full name of this package. */
632 /* Define to the full name and version of this package. */
633 #undef PACKAGE_STRING
635 /* Define to the one symbol short name of this package. */
636 #undef PACKAGE_TARNAME
638 /* Define to the home page for this package. */
641 /* Define to the version of this package. */
642 #undef PACKAGE_VERSION
644 /* default pidfile location */
647 /* Define to necessary symbol if this constant uses a non-standard name on
649 #undef PTHREAD_CREATE_JOINABLE
651 /* Define as the return type of signal handlers (`int' or `void'). */
654 /* default rootkey location */
655 #undef ROOT_ANCHOR_FILE
657 /* default rootcert location */
658 #undef ROOT_CERT_FILE
660 /* version number for resource files */
661 #undef RSRC_PACKAGE_VERSION
663 /* Directory to chdir to */
669 /* The size of `time_t', as computed by sizeof. */
672 /* define if (v)snprintf does not return length needed, (but length used) */
673 #undef SNPRINTF_RET_BROKEN
675 /* Define to 1 if libsodium supports sodium_set_misuse_handler */
676 #undef SODIUM_MISUSE_HANDLER
678 /* Define to 1 if you have the ANSI C header files. */
681 /* use default strptime. */
682 #undef STRPTIME_WORKS
684 /* Use win32 resources and API */
687 /* default username */
690 /* use to enable lightweight alloc assertions, for debug use */
691 #undef UNBOUND_ALLOC_LITE
693 /* use malloc not regions, for debug use */
694 #undef UNBOUND_ALLOC_NONREGIONAL
696 /* use statistics for allocs and frees, for debug use */
697 #undef UNBOUND_ALLOC_STATS
699 /* define this to enable debug checks. */
702 /* Define to 1 to use cachedb support */
705 /* Define to 1 to enable dnscrypt support */
708 /* Define to 1 to enable dnscrypt with xchacha20 support */
709 #undef USE_DNSCRYPT_XCHACHA20
711 /* Define to 1 to enable dnstap support */
714 /* Define this to enable DSA support. */
717 /* Define this to enable ECDSA support. */
720 /* Define this to enable an EVP workaround for older openssl */
721 #undef USE_ECDSA_EVP_WORKAROUND
723 /* Define this to enable ED25519 support. */
726 /* Define this to enable ED448 support. */
729 /* Define this to enable GOST support. */
732 /* Define to 1 to use ipsecmod support. */
735 /* Define if you want to use internal select based events */
736 #undef USE_MINI_EVENT
738 /* Define this to enable client TCP Fast Open. */
739 #undef USE_MSG_FASTOPEN
741 /* Define this to enable client TCP Fast Open. */
742 #undef USE_OSX_MSG_FASTOPEN
744 /* Define this to use hiredis client. */
747 /* Define this to enable SHA1 support. */
750 /* Define this to enable SHA256 and SHA512 support. */
753 /* Enable extensions on AIX 3, Interix. */
757 /* Enable GNU extensions on systems that have them. */
761 /* Enable threading extensions on Solaris. */
762 #ifndef _POSIX_PTHREAD_SEMANTICS
763 # undef _POSIX_PTHREAD_SEMANTICS
765 /* Enable extensions on HP NonStop. */
766 #ifndef _TANDEM_SOURCE
767 # undef _TANDEM_SOURCE
769 /* Enable general extensions on Solaris. */
770 #ifndef __EXTENSIONS__
771 # undef __EXTENSIONS__
775 /* Define this to enable server TCP Fast Open. */
776 #undef USE_TCP_FASTOPEN
778 /* Whether the windows socket API is used */
781 /* the version of the windows API enabled */
784 /* Define if you want Python module. */
785 #undef WITH_PYTHONMODULE
787 /* Define if you want PyUnbound. */
788 #undef WITH_PYUNBOUND
790 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
792 #undef YYTEXT_POINTER
794 /* Enable large inode numbers on Mac OS X 10.5. */
795 #ifndef _DARWIN_USE_64_BIT_INODE
796 # define _DARWIN_USE_64_BIT_INODE 1
799 /* Number of bits in a file offset, on hosts where this is settable. */
800 #undef _FILE_OFFSET_BITS
802 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
803 #undef _LARGEFILE_SOURCE
805 /* Define for large files, on AIX-style hosts. */
808 /* Define to 1 if on MINIX. */
811 /* Enable for compile on Minix */
812 #undef _NETBSD_SOURCE
814 /* Define to 2 if the system does not provide POSIX.1 features except with
816 #undef _POSIX_1_SOURCE
818 /* Define to 1 if you need to in order for `stat' and other things to work. */
821 /* Define to empty if `const' does not conform to ANSI C. */
824 /* Define to `int' if <sys/types.h> doesn't define. */
833 /* Define to `__inline__' or `__inline' if that's what the C compiler
834 calls it, or to nothing if 'inline' is not supported under any name. */
839 /* Define to `short' if <sys/types.h> does not define. */
842 /* Define to `int' if <sys/types.h> does not define. */
845 /* Define to `long long' if <sys/types.h> does not define. */
848 /* Define to `signed char' if <sys/types.h> does not define. */
851 /* Define if replacement function should be used. */
854 /* Define to `long int' if <sys/types.h> does not define. */
857 /* Define to `int' if <sys/types.h> does not define. */
860 /* Define to 'int' if not defined */
863 /* Define to `unsigned int' if <sys/types.h> does not define. */
866 /* Define to 'int' if not defined */
869 /* Define to `int' if <sys/types.h> does not define. */
872 /* Define to 'unsigned char if not defined */
875 /* Define to `int' if <sys/types.h> doesn't define. */
878 /* Define to `unsigned short' if <sys/types.h> does not define. */
881 /* Define to `unsigned int' if <sys/types.h> does not define. */
884 /* Define to `unsigned long long' if <sys/types.h> does not define. */
887 /* Define to `unsigned char' if <sys/types.h> does not define. */
890 /* Define as `fork' if `vfork' does not work. */
893 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
894 #define _GNU_SOURCE 1
897 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
898 #define _BSD_SOURCE 1
901 #if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
902 #define _DEFAULT_SOURCE 1
905 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
906 #define __EXTENSIONS__ 1
909 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
910 #define _POSIX_C_SOURCE 200112
913 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
914 #define _XOPEN_SOURCE 600
917 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
918 #define _XOPEN_SOURCE_EXTENDED 1
921 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
922 #define _ALL_SOURCE 1
925 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
926 #define _LARGEFILE_SOURCE 1
932 #ifndef UNBOUND_DEBUG
936 /** Use small-ldns codebase */
939 # define LDNS_BUILD_CONFIG_HAVE_SSL 1
963 #include <sys/param.h>
966 #ifdef HAVE_SYS_SOCKET_H
967 #include <sys/socket.h>
970 #ifdef HAVE_SYS_UIO_H
974 #ifdef HAVE_NETINET_IN_H
975 #include <netinet/in.h>
978 #ifdef HAVE_NETINET_TCP_H
979 #include <netinet/tcp.h>
982 #ifdef HAVE_ARPA_INET_H
983 #include <arpa/inet.h>
986 #ifdef HAVE_WINSOCK2_H
987 #include <winsock2.h>
990 #ifdef HAVE_WS2TCPIP_H
991 #include <ws2tcpip.h>
997 #define ARG_LL "%I64"
1001 #define AF_LOCAL AF_UNIX
1006 #ifdef HAVE_ATTR_FORMAT
1007 # define ATTR_FORMAT(archetype, string_index, first_to_check) \
1008 __attribute__ ((format (archetype, string_index, first_to_check)))
1009 #else /* !HAVE_ATTR_FORMAT */
1010 # define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
1011 #endif /* !HAVE_ATTR_FORMAT */
1014 #if defined(DOXYGEN)
1015 # define ATTR_UNUSED(x) x
1016 #elif defined(__cplusplus)
1017 # define ATTR_UNUSED(x)
1018 #elif defined(HAVE_ATTR_UNUSED)
1019 # define ATTR_UNUSED(x) x __attribute__((unused))
1020 #else /* !HAVE_ATTR_UNUSED */
1021 # define ATTR_UNUSED(x) x
1022 #endif /* !HAVE_ATTR_UNUSED */
1026 #define fseeko fseek
1027 #define ftello ftell
1028 #endif /* HAVE_FSEEKO */
1031 #ifndef MAXHOSTNAMELEN
1032 #define MAXHOSTNAMELEN 256
1035 #if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
1036 #define snprintf snprintf_unbound
1037 #define vsnprintf vsnprintf_unbound
1039 int snprintf (char *str, size_t count, const char *fmt, ...);
1040 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
1041 #endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
1043 #ifndef HAVE_INET_PTON
1044 #define inet_pton inet_pton_unbound
1045 int inet_pton(int af, const char* src, void* dst);
1046 #endif /* HAVE_INET_PTON */
1049 #ifndef HAVE_INET_NTOP
1050 #define inet_ntop inet_ntop_unbound
1051 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1055 #ifndef HAVE_INET_ATON
1056 #define inet_aton inet_aton_unbound
1057 int inet_aton(const char *cp, struct in_addr *addr);
1061 #ifndef HAVE_MEMMOVE
1062 #define memmove memmove_unbound
1063 void *memmove(void *dest, const void *src, size_t n);
1067 #ifndef HAVE_STRLCAT
1068 #define strlcat strlcat_unbound
1069 size_t strlcat(char *dst, const char *src, size_t siz);
1073 #ifndef HAVE_STRLCPY
1074 #define strlcpy strlcpy_unbound
1075 size_t strlcpy(char *dst, const char *src, size_t siz);
1079 #ifndef HAVE_GMTIME_R
1080 #define gmtime_r gmtime_r_unbound
1081 struct tm *gmtime_r(const time_t *timep, struct tm *result);
1085 #ifndef HAVE_REALLOCARRAY
1086 #define reallocarray reallocarrayunbound
1087 void* reallocarray(void *ptr, size_t nmemb, size_t size);
1091 #if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1092 #define sleep(x) Sleep((x)*1000) /* on win32 */
1093 #endif /* HAVE_SLEEP */
1097 #define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1098 #endif /* HAVE_USLEEP */
1102 #define random rand /* on win32, for tests only (bad random) */
1103 #endif /* HAVE_RANDOM */
1106 #ifndef HAVE_SRANDOM
1107 #define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1108 #endif /* HAVE_SRANDOM */
1111 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1112 #ifdef HAVE_WINSOCK2_H
1113 #define FD_SET_T (u_int)
1119 #ifndef IPV6_MIN_MTU
1120 #define IPV6_MIN_MTU 1280
1121 #endif /* IPV6_MIN_MTU */
1124 #ifdef MEMCMP_IS_BROKEN
1125 #include "compat/memcmp.h"
1126 #define memcmp memcmp_unbound
1127 int memcmp(const void *x, const void *y, size_t n);
1132 #ifndef HAVE_CTIME_R
1133 #define ctime_r unbound_ctime_r
1134 char *ctime_r(const time_t *timep, char *buf);
1138 #define strsep unbound_strsep
1139 char *strsep(char **stringp, const char *delim);
1142 #ifndef HAVE_ISBLANK
1143 #define isblank unbound_isblank
1147 #if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
1148 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1151 #if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
1152 int inet_pton(int af, const char* src, void* dst);
1155 #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1156 #define strptime unbound_strptime
1158 char *strptime(const char *s, const char *format, struct tm *tm);
1161 #ifdef HAVE_LIBRESSL
1162 # if !HAVE_DECL_STRLCPY
1163 size_t strlcpy(char *dst, const char *src, size_t siz);
1165 # if !HAVE_DECL_STRLCAT
1166 size_t strlcat(char *dst, const char *src, size_t siz);
1168 # if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1169 uint32_t arc4random(void);
1171 # if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1172 uint32_t arc4random_uniform(uint32_t upper_bound);
1174 # if !HAVE_DECL_REALLOCARRAY
1175 void *reallocarray(void *ptr, size_t nmemb, size_t size);
1177 #endif /* HAVE_LIBRESSL */
1178 #ifndef HAVE_ARC4RANDOM
1179 void explicit_bzero(void* buf, size_t len);
1180 int getentropy(void* buf, size_t len);
1181 uint32_t arc4random(void);
1182 void arc4random_buf(void* buf, size_t n);
1183 void _ARC4_LOCK(void);
1184 void _ARC4_UNLOCK(void);
1185 void _ARC4_LOCK_DESTROY(void);
1187 #ifndef HAVE_ARC4RANDOM_UNIFORM
1188 uint32_t arc4random_uniform(uint32_t upper_bound);
1190 #ifdef COMPAT_SHA512
1191 #ifndef SHA512_DIGEST_LENGTH
1192 #define SHA512_BLOCK_LENGTH 128
1193 #define SHA512_DIGEST_LENGTH 64
1194 #define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
1195 typedef struct _SHA512_CTX {
1197 uint64_t bitcount[2];
1198 uint8_t buffer[SHA512_BLOCK_LENGTH];
1200 #endif /* SHA512_DIGEST_LENGTH */
1201 void SHA512_Init(SHA512_CTX*);
1202 void SHA512_Update(SHA512_CTX*, void*, size_t);
1203 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1204 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1205 #endif /* COMPAT_SHA512 */
1209 #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))
1210 /* using version of libevent that is not threadsafe. */
1211 # define LIBEVENT_SIGNAL_PROBLEM 1
1214 #ifndef CHECKED_INET6
1215 # define CHECKED_INET6
1219 # define AF_INET6 28
1221 #endif /* CHECKED_INET6 */
1223 #ifndef HAVE_GETADDRINFO
1224 struct sockaddr_storage;
1225 #include "compat/fake-rfc2553.h"
1228 #ifdef UNBOUND_ALLOC_STATS
1229 # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1230 # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1231 # define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1232 # define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1233 void *unbound_stat_malloc(size_t size);
1234 void *unbound_stat_calloc(size_t nmemb, size_t size);
1235 void unbound_stat_free(void *ptr);
1236 void *unbound_stat_realloc(void *ptr, size_t size);
1237 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1239 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1240 int line, const char* func);
1241 void unbound_stat_free_log(void *ptr, const char* file, int line,
1243 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1244 int line, const char* func);
1245 #elif defined(UNBOUND_ALLOC_LITE)
1246 # include "util/alloc.h"
1247 #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1249 /** default port for DNS traffic. */
1250 #define UNBOUND_DNS_PORT 53
1251 /** default port for DNS over TLS traffic. */
1252 #define UNBOUND_DNS_OVER_TLS_PORT 853
1253 /** default port for unbound control traffic, registered port with IANA,
1254 ub-dns-control 8953/tcp unbound dns nameserver control */
1255 #define UNBOUND_CONTROL_PORT 8953
1256 /** the version of unbound-control that this software implements */
1257 #define UNBOUND_CONTROL_VERSION 1