1 /* config.h. Generated from config.h.in by configure. */
2 /* config.h.in. Generated from configure.ac by autoheader. */
4 /* Directory to chroot to */
5 #define CHROOT_DIR "/var/unbound"
7 /* Define this to enable client subnet option. */
8 /* #undef CLIENT_SUBNET */
10 /* Do sha512 definitions in config.h */
11 /* #undef COMPAT_SHA512 */
13 /* Pathname to the Unbound configuration file */
14 #define CONFIGFILE "/var/unbound/unbound.conf"
16 /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
18 /* #undef DARWIN_BROKEN_SETREUID */
20 /* Whether daemon is deprecated */
21 /* #undef DEPRECATED_DAEMON */
23 /* default dnstap socket path */
24 /* #undef DNSTAP_SOCKET_PATH */
26 /* Define if you want to use debug lock checking (slow). */
27 /* #undef ENABLE_LOCK_CHECKS */
29 /* Define this if you enabled-allsymbols from libunbound to link binaries to
30 it for smaller install size, but the libunbound export table is polluted by
32 /* #undef EXPORT_ALL_SYMBOLS */
34 /* Define to 1 if you have the `arc4random' function. */
35 #define HAVE_ARC4RANDOM 1
37 /* Define to 1 if you have the `arc4random_uniform' function. */
38 #define HAVE_ARC4RANDOM_UNIFORM 1
40 /* Define to 1 if you have the <arpa/inet.h> header file. */
41 #define HAVE_ARPA_INET_H 1
43 /* Whether the C compiler accepts the "format" attribute */
44 #define HAVE_ATTR_FORMAT 1
46 /* Whether the C compiler accepts the "unused" attribute */
47 #define HAVE_ATTR_UNUSED 1
49 /* Whether the C compiler accepts the "weak" attribute */
50 #define HAVE_ATTR_WEAK 1
52 /* Define to 1 if you have the `chown' function. */
55 /* Define to 1 if you have the `chroot' function. */
58 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
59 #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
61 /* Define to 1 if you have the `ctime_r' function. */
62 #define HAVE_CTIME_R 1
64 /* Define to 1 if you have the `daemon' function. */
67 /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
69 /* #undef HAVE_DECL_ARC4RANDOM */
71 /* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
73 /* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */
75 /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
77 #define HAVE_DECL_INET_NTOP 1
79 /* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
81 #define HAVE_DECL_INET_PTON 1
83 /* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
85 #define HAVE_DECL_NID_ED25519 0
87 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
89 #define HAVE_DECL_NID_SECP384R1 1
91 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
93 #define HAVE_DECL_NID_X9_62_PRIME256V1 1
95 /* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
97 /* #undef HAVE_DECL_REALLOCARRAY */
99 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
101 #define HAVE_DECL_SK_SSL_COMP_POP_FREE 1
103 /* Define to 1 if you have the declaration of
104 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
105 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1
107 /* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
109 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 1
111 /* Define to 1 if you have the declaration of `strlcat', and to 0 if you
113 /* #undef HAVE_DECL_STRLCAT */
115 /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
117 /* #undef HAVE_DECL_STRLCPY */
119 /* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
121 #define HAVE_DECL_XML_STOPPARSER 1
123 /* Define to 1 if you have the <dlfcn.h> header file. */
124 #define HAVE_DLFCN_H 1
126 /* Define to 1 if you have the `DSA_SIG_set0' function. */
127 /* #undef HAVE_DSA_SIG_SET0 */
129 /* Define to 1 if you have the <endian.h> header file. */
130 /* #undef HAVE_ENDIAN_H */
132 /* Define to 1 if you have the `endprotoent' function. */
133 #define HAVE_ENDPROTOENT 1
135 /* Define to 1 if you have the `endpwent' function. */
136 #define HAVE_ENDPWENT 1
138 /* Define to 1 if you have the `endservent' function. */
139 #define HAVE_ENDSERVENT 1
141 /* Define to 1 if you have the `ERR_free_strings' function. */
142 #define HAVE_ERR_FREE_STRINGS 1
144 /* Define to 1 if you have the `ERR_load_crypto_strings' function. */
145 #define HAVE_ERR_LOAD_CRYPTO_STRINGS 1
147 /* Define to 1 if you have the `event_base_free' function. */
148 /* #undef HAVE_EVENT_BASE_FREE */
150 /* Define to 1 if you have the `event_base_get_method' function. */
151 /* #undef HAVE_EVENT_BASE_GET_METHOD */
153 /* Define to 1 if you have the `event_base_new' function. */
154 /* #undef HAVE_EVENT_BASE_NEW */
156 /* Define to 1 if you have the `event_base_once' function. */
157 /* #undef HAVE_EVENT_BASE_ONCE */
159 /* Define to 1 if you have the <event.h> header file. */
160 /* #undef HAVE_EVENT_H */
162 /* Define to 1 if you have the `EVP_cleanup' function. */
163 #define HAVE_EVP_CLEANUP 1
165 /* Define to 1 if you have the `EVP_DigestVerify' function. */
166 /* #undef HAVE_EVP_DIGESTVERIFY */
168 /* Define to 1 if you have the `EVP_dss1' function. */
169 #define HAVE_EVP_DSS1 1
171 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
172 /* #undef HAVE_EVP_MD_CTX_NEW */
174 /* Define to 1 if you have the `EVP_sha1' function. */
175 #define HAVE_EVP_SHA1 1
177 /* Define to 1 if you have the `EVP_sha256' function. */
178 #define HAVE_EVP_SHA256 1
180 /* Define to 1 if you have the `EVP_sha512' function. */
181 #define HAVE_EVP_SHA512 1
183 /* Define to 1 if you have the `ev_default_loop' function. */
184 /* #undef HAVE_EV_DEFAULT_LOOP */
186 /* Define to 1 if you have the `ev_loop' function. */
187 /* #undef HAVE_EV_LOOP */
189 /* Define to 1 if you have the <expat.h> header file. */
190 #define HAVE_EXPAT_H 1
192 /* Define to 1 if you have the `fcntl' function. */
195 /* Define to 1 if you have the `FIPS_mode' function. */
196 #define HAVE_FIPS_MODE 1
198 /* Define to 1 if you have the `fork' function. */
201 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
202 #define HAVE_FSEEKO 1
204 /* Define to 1 if you have the `fsync' function. */
207 /* Whether getaddrinfo is available */
208 #define HAVE_GETADDRINFO 1
210 /* Define to 1 if you have the `getauxval' function. */
211 /* #undef HAVE_GETAUXVAL */
213 /* Define to 1 if you have the `getentropy' function. */
214 /* #undef HAVE_GETENTROPY */
216 /* Define to 1 if you have the <getopt.h> header file. */
217 #define HAVE_GETOPT_H 1
219 /* Define to 1 if you have the `getpwnam' function. */
220 #define HAVE_GETPWNAM 1
222 /* Define to 1 if you have the `getrlimit' function. */
223 #define HAVE_GETRLIMIT 1
225 /* Define to 1 if you have the `glob' function. */
228 /* Define to 1 if you have the <glob.h> header file. */
229 #define HAVE_GLOB_H 1
231 /* Define to 1 if you have the `gmtime_r' function. */
232 #define HAVE_GMTIME_R 1
234 /* Define to 1 if you have the <grp.h> header file. */
237 /* If you have HMAC_Update */
238 #define HAVE_HMAC_UPDATE 1
240 /* Define to 1 if you have the `inet_aton' function. */
241 #define HAVE_INET_ATON 1
243 /* Define to 1 if you have the `inet_ntop' function. */
244 #define HAVE_INET_NTOP 1
246 /* Define to 1 if you have the `inet_pton' function. */
247 #define HAVE_INET_PTON 1
249 /* Define to 1 if you have the `initgroups' function. */
250 #define HAVE_INITGROUPS 1
252 /* Define to 1 if you have the <inttypes.h> header file. */
253 #define HAVE_INTTYPES_H 1
255 /* if the function 'ioctlsocket' is available */
256 /* #undef HAVE_IOCTLSOCKET */
258 /* Define to 1 if you have the <iphlpapi.h> header file. */
259 /* #undef HAVE_IPHLPAPI_H */
261 /* Define to 1 if you have the `isblank' function. */
262 #define HAVE_ISBLANK 1
264 /* Define to 1 if you have the `kill' function. */
267 /* Define if we have LibreSSL */
268 /* #undef HAVE_LIBRESSL */
270 /* Define to 1 if you have the `localtime_r' function. */
271 #define HAVE_LOCALTIME_R 1
273 /* Define to 1 if you have the <login_cap.h> header file. */
274 #define HAVE_LOGIN_CAP_H 1
276 /* If have GNU libc compatible malloc */
277 #define HAVE_MALLOC 1
279 /* Define to 1 if you have the `memmove' function. */
280 #define HAVE_MEMMOVE 1
282 /* Define to 1 if you have the <memory.h> header file. */
283 #define HAVE_MEMORY_H 1
285 /* Define to 1 if you have the <netdb.h> header file. */
286 #define HAVE_NETDB_H 1
288 /* Define to 1 if you have the <netinet/in.h> header file. */
289 #define HAVE_NETINET_IN_H 1
291 /* Define to 1 if you have the <netinet/tcp.h> header file. */
292 #define HAVE_NETINET_TCP_H 1
294 /* Use libnettle for crypto */
295 /* #undef HAVE_NETTLE */
297 /* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
298 /* #undef HAVE_NETTLE_DSA_COMPAT_H */
300 /* Use libnss for crypto */
301 /* #undef HAVE_NSS */
303 /* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
304 #define HAVE_OPENSSL_ADD_ALL_DIGESTS 1
306 /* Define to 1 if you have the <openssl/bn.h> header file. */
307 #define HAVE_OPENSSL_BN_H 1
309 /* Define to 1 if you have the `OPENSSL_config' function. */
310 #define HAVE_OPENSSL_CONFIG 1
312 /* Define to 1 if you have the <openssl/conf.h> header file. */
313 #define HAVE_OPENSSL_CONF_H 1
315 /* Define to 1 if you have the <openssl/dh.h> header file. */
316 #define HAVE_OPENSSL_DH_H 1
318 /* Define to 1 if you have the <openssl/dsa.h> header file. */
319 #define HAVE_OPENSSL_DSA_H 1
321 /* Define to 1 if you have the <openssl/engine.h> header file. */
322 #define HAVE_OPENSSL_ENGINE_H 1
324 /* Define to 1 if you have the <openssl/err.h> header file. */
325 #define HAVE_OPENSSL_ERR_H 1
327 /* Define to 1 if you have the `OPENSSL_init_crypto' function. */
328 /* #undef HAVE_OPENSSL_INIT_CRYPTO */
330 /* Define to 1 if you have the `OPENSSL_init_ssl' function. */
331 /* #undef HAVE_OPENSSL_INIT_SSL */
333 /* Define to 1 if you have the <openssl/rand.h> header file. */
334 #define HAVE_OPENSSL_RAND_H 1
336 /* Define to 1 if you have the <openssl/rsa.h> header file. */
337 #define HAVE_OPENSSL_RSA_H 1
339 /* Define to 1 if you have the <openssl/ssl.h> header file. */
340 #define HAVE_OPENSSL_SSL_H 1
342 /* Define if you have POSIX threads libraries and header files. */
343 #define HAVE_PTHREAD 1
345 /* Have PTHREAD_PRIO_INHERIT. */
346 #define HAVE_PTHREAD_PRIO_INHERIT 1
348 /* Define to 1 if the system has the type `pthread_rwlock_t'. */
349 #define HAVE_PTHREAD_RWLOCK_T 1
351 /* Define to 1 if the system has the type `pthread_spinlock_t'. */
352 #define HAVE_PTHREAD_SPINLOCK_T 1
354 /* Define to 1 if you have the <pwd.h> header file. */
357 /* Define if you have Python libraries and header files. */
358 /* #undef HAVE_PYTHON */
360 /* Define to 1 if you have the `random' function. */
361 #define HAVE_RANDOM 1
363 /* Define to 1 if you have the `RAND_cleanup' function. */
364 #define HAVE_RAND_CLEANUP 1
366 /* Define to 1 if you have the `reallocarray' function. */
367 #define HAVE_REALLOCARRAY 1
369 /* Define to 1 if you have the `recvmsg' function. */
370 #define HAVE_RECVMSG 1
372 /* Define to 1 if you have the `sendmsg' function. */
373 #define HAVE_SENDMSG 1
375 /* Define to 1 if you have the `setregid' function. */
376 /* #undef HAVE_SETREGID */
378 /* Define to 1 if you have the `setresgid' function. */
379 #define HAVE_SETRESGID 1
381 /* Define to 1 if you have the `setresuid' function. */
382 #define HAVE_SETRESUID 1
384 /* Define to 1 if you have the `setreuid' function. */
385 /* #undef HAVE_SETREUID */
387 /* Define to 1 if you have the `setrlimit' function. */
388 #define HAVE_SETRLIMIT 1
390 /* Define to 1 if you have the `setsid' function. */
391 #define HAVE_SETSID 1
393 /* Define to 1 if you have the `setusercontext' function. */
394 #define HAVE_SETUSERCONTEXT 1
396 /* Define to 1 if you have the `SHA512_Update' function. */
397 /* #undef HAVE_SHA512_UPDATE */
399 /* Define to 1 if you have the `shmget' function. */
400 #define HAVE_SHMGET 1
402 /* Define to 1 if you have the `sigprocmask' function. */
403 #define HAVE_SIGPROCMASK 1
405 /* Define to 1 if you have the `sleep' function. */
408 /* Define to 1 if you have the `snprintf' function. */
409 #define HAVE_SNPRINTF 1
411 /* Define to 1 if you have the `socketpair' function. */
412 #define HAVE_SOCKETPAIR 1
414 /* Using Solaris threads */
415 /* #undef HAVE_SOLARIS_THREADS */
417 /* Define to 1 if you have the `srandom' function. */
418 #define HAVE_SRANDOM 1
420 /* Define if you have the SSL libraries installed. */
421 #define HAVE_SSL /**/
423 /* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
424 /* #undef HAVE_SSL_CTX_SET_SECURITY_LEVEL */
426 /* Define to 1 if you have the <stdarg.h> header file. */
427 #define HAVE_STDARG_H 1
429 /* Define to 1 if you have the <stdbool.h> header file. */
430 #define HAVE_STDBOOL_H 1
432 /* Define to 1 if you have the <stdint.h> header file. */
433 #define HAVE_STDINT_H 1
435 /* Define to 1 if you have the <stdlib.h> header file. */
436 #define HAVE_STDLIB_H 1
438 /* Define to 1 if you have the `strftime' function. */
439 #define HAVE_STRFTIME 1
441 /* Define to 1 if you have the <strings.h> header file. */
442 #define HAVE_STRINGS_H 1
444 /* Define to 1 if you have the <string.h> header file. */
445 #define HAVE_STRING_H 1
447 /* Define to 1 if you have the `strlcat' function. */
448 #define HAVE_STRLCAT 1
450 /* Define to 1 if you have the `strlcpy' function. */
451 #define HAVE_STRLCPY 1
453 /* Define to 1 if you have the `strptime' function. */
454 #define HAVE_STRPTIME 1
456 /* Define to 1 if you have the `strsep' function. */
457 #define HAVE_STRSEP 1
459 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
460 /* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */
462 /* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
463 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
465 /* Define if you have Swig libraries and header files. */
466 /* #undef HAVE_SWIG */
468 /* Define to 1 if you have the <syslog.h> header file. */
469 #define HAVE_SYSLOG_H 1
471 /* Define to 1 if systemd should be used */
472 /* #undef HAVE_SYSTEMD */
474 /* Define to 1 if you have the <sys/ipc.h> header file. */
475 #define HAVE_SYS_IPC_H 1
477 /* Define to 1 if you have the <sys/param.h> header file. */
478 #define HAVE_SYS_PARAM_H 1
480 /* Define to 1 if you have the <sys/resource.h> header file. */
481 #define HAVE_SYS_RESOURCE_H 1
483 /* Define to 1 if you have the <sys/sha2.h> header file. */
484 /* #undef HAVE_SYS_SHA2_H */
486 /* Define to 1 if you have the <sys/shm.h> header file. */
487 #define HAVE_SYS_SHM_H 1
489 /* Define to 1 if you have the <sys/socket.h> header file. */
490 #define HAVE_SYS_SOCKET_H 1
492 /* Define to 1 if you have the <sys/stat.h> header file. */
493 #define HAVE_SYS_STAT_H 1
495 /* Define to 1 if you have the <sys/sysctl.h> header file. */
496 /* #undef HAVE_SYS_SYSCTL_H */
498 /* Define to 1 if you have the <sys/types.h> header file. */
499 #define HAVE_SYS_TYPES_H 1
501 /* Define to 1 if you have the <sys/uio.h> header file. */
502 #define HAVE_SYS_UIO_H 1
504 /* Define to 1 if you have the <sys/un.h> header file. */
505 #define HAVE_SYS_UN_H 1
507 /* Define to 1 if you have the <sys/wait.h> header file. */
508 #define HAVE_SYS_WAIT_H 1
510 /* Define to 1 if you have the <time.h> header file. */
511 #define HAVE_TIME_H 1
513 /* Define to 1 if you have the `tzset' function. */
516 /* Define to 1 if you have the <unistd.h> header file. */
517 #define HAVE_UNISTD_H 1
519 /* Define to 1 if you have the `usleep' function. */
520 #define HAVE_USLEEP 1
522 /* Define to 1 if you have the `vfork' function. */
525 /* Define to 1 if you have the <vfork.h> header file. */
526 /* #undef HAVE_VFORK_H */
528 /* Define to 1 if you have the <windows.h> header file. */
529 /* #undef HAVE_WINDOWS_H */
531 /* Using Windows threads */
532 /* #undef HAVE_WINDOWS_THREADS */
534 /* Define to 1 if you have the <winsock2.h> header file. */
535 /* #undef HAVE_WINSOCK2_H */
537 /* Define to 1 if `fork' works. */
538 #define HAVE_WORKING_FORK 1
540 /* Define to 1 if `vfork' works. */
541 #define HAVE_WORKING_VFORK 1
543 /* Define to 1 if you have the `writev' function. */
544 #define HAVE_WRITEV 1
546 /* Define to 1 if you have the <ws2tcpip.h> header file. */
547 /* #undef HAVE_WS2TCPIP_H */
549 /* Define to 1 if you have the `_beginthreadex' function. */
550 /* #undef HAVE__BEGINTHREADEX */
552 /* if lex has yylex_destroy */
553 #define LEX_HAS_YYLEX_DESTROY 1
555 /* Define to the sub-directory where libtool stores uninstalled libraries. */
556 #define LT_OBJDIR ".libs/"
558 /* Define to the maximum message length to pass to syslog. */
559 #define MAXSYSLOGMSGLEN 10240
561 /* Define if memcmp() does not compare unsigned bytes */
562 /* #undef MEMCMP_IS_BROKEN */
564 /* Define if mkdir has one argument. */
565 /* #undef MKDIR_HAS_ONE_ARG */
567 /* Define if the network stack does not fully support nonblocking io (causes
568 lower performance). */
569 /* #undef NONBLOCKING_IS_BROKEN */
571 /* Put -D_ALL_SOURCE define in config.h */
572 /* #undef OMITTED__D_ALL_SOURCE */
574 /* Put -D_BSD_SOURCE define in config.h */
575 /* #undef OMITTED__D_BSD_SOURCE */
577 /* Put -D_DEFAULT_SOURCE define in config.h */
578 /* #undef OMITTED__D_DEFAULT_SOURCE */
580 /* Put -D_GNU_SOURCE define in config.h */
581 /* #undef OMITTED__D_GNU_SOURCE */
583 /* Put -D_LARGEFILE_SOURCE=1 define in config.h */
584 /* #undef OMITTED__D_LARGEFILE_SOURCE_1 */
586 /* Put -D_POSIX_C_SOURCE=200112 define in config.h */
587 /* #undef OMITTED__D_POSIX_C_SOURCE_200112 */
589 /* Put -D_XOPEN_SOURCE=600 define in config.h */
590 /* #undef OMITTED__D_XOPEN_SOURCE_600 */
592 /* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
593 /* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */
595 /* Put -D__EXTENSIONS__ define in config.h */
596 /* #undef OMITTED__D__EXTENSIONS__ */
598 /* Define to the address where bug reports for this package should be sent. */
599 #define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl"
601 /* Define to the full name of this package. */
602 #define PACKAGE_NAME "unbound"
604 /* Define to the full name and version of this package. */
605 #define PACKAGE_STRING "unbound 1.6.4"
607 /* Define to the one symbol short name of this package. */
608 #define PACKAGE_TARNAME "unbound"
610 /* Define to the home page for this package. */
611 #define PACKAGE_URL ""
613 /* Define to the version of this package. */
614 #define PACKAGE_VERSION "1.6.4"
616 /* default pidfile location */
617 #define PIDFILE "/var/unbound/unbound.pid"
619 /* Define to necessary symbol if this constant uses a non-standard name on
621 /* #undef PTHREAD_CREATE_JOINABLE */
623 /* Define as the return type of signal handlers (`int' or `void'). */
624 #define RETSIGTYPE void
626 /* default rootkey location */
627 #define ROOT_ANCHOR_FILE "/var/unbound/root.key"
629 /* default rootcert location */
630 #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
632 /* version number for resource files */
633 #define RSRC_PACKAGE_VERSION 1,6,4,0
635 /* Directory to chdir to */
636 #define RUN_DIR "/var/unbound"
639 #define SHARE_DIR "/var/unbound"
641 /* The size of `time_t', as computed by sizeof. */
642 #define SIZEOF_TIME_T 8
644 /* define if (v)snprintf does not return length needed, (but length used) */
645 /* #undef SNPRINTF_RET_BROKEN */
647 /* Define to 1 if you have the ANSI C header files. */
648 #define STDC_HEADERS 1
650 /* use default strptime. */
651 #define STRPTIME_WORKS 1
653 /* Use win32 resources and API */
654 /* #undef UB_ON_WINDOWS */
656 /* default username */
657 #define UB_USERNAME "unbound"
659 /* use to enable lightweight alloc assertions, for debug use */
660 /* #undef UNBOUND_ALLOC_LITE */
662 /* use malloc not regions, for debug use */
663 /* #undef UNBOUND_ALLOC_NONREGIONAL */
665 /* use statistics for allocs and frees, for debug use */
666 /* #undef UNBOUND_ALLOC_STATS */
668 /* define this to enable debug checks. */
669 /* #undef UNBOUND_DEBUG */
671 /* Define to 1 to use cachedb support */
672 /* #undef USE_CACHEDB */
674 /* Define to 1 to enable dnscrypt support */
675 /* #undef USE_DNSCRYPT */
677 /* Define to 1 to enable dnscrypt with xchacha20 support */
678 /* #undef USE_DNSCRYPT_XCHACHA20 */
680 /* Define to 1 to enable dnstap support */
681 /* #undef USE_DNSTAP */
683 /* Define this to enable DSA support. */
686 /* Define this to enable ECDSA support. */
689 /* Define this to enable an EVP workaround for older openssl */
690 /* #undef USE_ECDSA_EVP_WORKAROUND */
692 /* Define this to enable ED25519 support. */
693 /* #undef USE_ED25519 */
695 /* Define this to enable GOST support. */
698 /* Define to 1 to use ipsecmod support. */
699 /* #undef USE_IPSECMOD */
701 /* Define if you want to use internal select based events */
702 #define USE_MINI_EVENT 1
704 /* Define this to enable client TCP Fast Open. */
705 /* #undef USE_MSG_FASTOPEN */
707 /* Define this to enable client TCP Fast Open. */
708 /* #undef USE_OSX_MSG_FASTOPEN */
710 /* Define this to enable SHA1 support. */
713 /* Define this to enable SHA256 and SHA512 support. */
716 /* Enable extensions on AIX 3, Interix. */
718 # define _ALL_SOURCE 1
720 /* Enable GNU extensions on systems that have them. */
722 # define _GNU_SOURCE 1
724 /* Enable threading extensions on Solaris. */
725 #ifndef _POSIX_PTHREAD_SEMANTICS
726 # define _POSIX_PTHREAD_SEMANTICS 1
728 /* Enable extensions on HP NonStop. */
729 #ifndef _TANDEM_SOURCE
730 # define _TANDEM_SOURCE 1
732 /* Enable general extensions on Solaris. */
733 #ifndef __EXTENSIONS__
734 # define __EXTENSIONS__ 1
738 /* Define this to enable server TCP Fast Open. */
739 /* #undef USE_TCP_FASTOPEN */
741 /* Whether the windows socket API is used */
742 /* #undef USE_WINSOCK */
744 /* the version of the windows API enabled */
745 #define WINVER 0x0502
747 /* Define if you want Python module. */
748 /* #undef WITH_PYTHONMODULE */
750 /* Define if you want PyUnbound. */
751 /* #undef WITH_PYUNBOUND */
753 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
755 #define YYTEXT_POINTER 1
757 /* Enable large inode numbers on Mac OS X 10.5. */
758 #ifndef _DARWIN_USE_64_BIT_INODE
759 # define _DARWIN_USE_64_BIT_INODE 1
762 /* Number of bits in a file offset, on hosts where this is settable. */
763 /* #undef _FILE_OFFSET_BITS */
765 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
766 /* #undef _LARGEFILE_SOURCE */
768 /* Define for large files, on AIX-style hosts. */
769 /* #undef _LARGE_FILES */
771 /* Define to 1 if on MINIX. */
774 /* Enable for compile on Minix */
775 /* #undef _NETBSD_SOURCE */
777 /* Define to 2 if the system does not provide POSIX.1 features except with
779 /* #undef _POSIX_1_SOURCE */
781 /* Define to 1 if you need to in order for `stat' and other things to work. */
782 /* #undef _POSIX_SOURCE */
784 /* Define to empty if `const' does not conform to ANSI C. */
787 /* Define to `int' if <sys/types.h> doesn't define. */
791 /* #undef in_addr_t */
794 /* #undef in_port_t */
796 /* Define to `__inline__' or `__inline' if that's what the C compiler
797 calls it, or to nothing if 'inline' is not supported under any name. */
802 /* Define to `short' if <sys/types.h> does not define. */
805 /* Define to `int' if <sys/types.h> does not define. */
808 /* Define to `long long' if <sys/types.h> does not define. */
811 /* Define to `signed char' if <sys/types.h> does not define. */
814 /* Define if replacement function should be used. */
817 /* Define to `long int' if <sys/types.h> does not define. */
820 /* Define to `int' if <sys/types.h> does not define. */
823 /* Define to 'int' if not defined */
826 /* Define to `unsigned int' if <sys/types.h> does not define. */
829 /* Define to 'int' if not defined */
830 /* #undef socklen_t */
832 /* Define to `int' if <sys/types.h> does not define. */
835 /* Define to 'unsigned char if not defined */
838 /* Define to `int' if <sys/types.h> doesn't define. */
841 /* Define to `unsigned short' if <sys/types.h> does not define. */
842 /* #undef uint16_t */
844 /* Define to `unsigned int' if <sys/types.h> does not define. */
845 /* #undef uint32_t */
847 /* Define to `unsigned long long' if <sys/types.h> does not define. */
848 /* #undef uint64_t */
850 /* Define to `unsigned char' if <sys/types.h> does not define. */
853 /* Define as `fork' if `vfork' does not work. */
856 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
857 #define _GNU_SOURCE 1
860 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
861 #define _BSD_SOURCE 1
864 #if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
865 #define _DEFAULT_SOURCE 1
868 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
869 #define __EXTENSIONS__ 1
872 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
873 #define _POSIX_C_SOURCE 200112
876 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
877 #define _XOPEN_SOURCE 600
880 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
881 #define _XOPEN_SOURCE_EXTENDED 1
884 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
885 #define _ALL_SOURCE 1
888 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
889 #define _LARGEFILE_SOURCE 1
895 #ifndef UNBOUND_DEBUG
899 /** Use small-ldns codebase */
902 # define LDNS_BUILD_CONFIG_HAVE_SSL 1
926 #include <sys/param.h>
929 #ifdef HAVE_SYS_SOCKET_H
930 #include <sys/socket.h>
933 #ifdef HAVE_SYS_UIO_H
937 #ifdef HAVE_NETINET_IN_H
938 #include <netinet/in.h>
941 #ifdef HAVE_NETINET_TCP_H
942 #include <netinet/tcp.h>
945 #ifdef HAVE_ARPA_INET_H
946 #include <arpa/inet.h>
949 #ifdef HAVE_WINSOCK2_H
950 #include <winsock2.h>
953 #ifdef HAVE_WS2TCPIP_H
954 #include <ws2tcpip.h>
960 #define ARG_LL "%I64"
964 #define AF_LOCAL AF_UNIX
969 #ifdef HAVE_ATTR_FORMAT
970 # define ATTR_FORMAT(archetype, string_index, first_to_check) \
971 __attribute__ ((format (archetype, string_index, first_to_check)))
972 #else /* !HAVE_ATTR_FORMAT */
973 # define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
974 #endif /* !HAVE_ATTR_FORMAT */
978 # define ATTR_UNUSED(x) x
979 #elif defined(__cplusplus)
980 # define ATTR_UNUSED(x)
981 #elif defined(HAVE_ATTR_UNUSED)
982 # define ATTR_UNUSED(x) x __attribute__((unused))
983 #else /* !HAVE_ATTR_UNUSED */
984 # define ATTR_UNUSED(x) x
985 #endif /* !HAVE_ATTR_UNUSED */
991 #endif /* HAVE_FSEEKO */
994 #ifndef MAXHOSTNAMELEN
995 #define MAXHOSTNAMELEN 256
998 #if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
999 #define snprintf snprintf_unbound
1000 #define vsnprintf vsnprintf_unbound
1002 int snprintf (char *str, size_t count, const char *fmt, ...);
1003 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
1004 #endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
1006 #ifndef HAVE_INET_PTON
1007 #define inet_pton inet_pton_unbound
1008 int inet_pton(int af, const char* src, void* dst);
1009 #endif /* HAVE_INET_PTON */
1012 #ifndef HAVE_INET_NTOP
1013 #define inet_ntop inet_ntop_unbound
1014 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1018 #ifndef HAVE_INET_ATON
1019 #define inet_aton inet_aton_unbound
1020 int inet_aton(const char *cp, struct in_addr *addr);
1024 #ifndef HAVE_MEMMOVE
1025 #define memmove memmove_unbound
1026 void *memmove(void *dest, const void *src, size_t n);
1030 #ifndef HAVE_STRLCAT
1031 #define strlcat strlcat_unbound
1032 size_t strlcat(char *dst, const char *src, size_t siz);
1036 #ifndef HAVE_STRLCPY
1037 #define strlcpy strlcpy_unbound
1038 size_t strlcpy(char *dst, const char *src, size_t siz);
1042 #ifndef HAVE_GMTIME_R
1043 #define gmtime_r gmtime_r_unbound
1044 struct tm *gmtime_r(const time_t *timep, struct tm *result);
1048 #ifndef HAVE_REALLOCARRAY
1049 #define reallocarray reallocarrayunbound
1050 void* reallocarray(void *ptr, size_t nmemb, size_t size);
1054 #if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1055 #define sleep(x) Sleep((x)*1000) /* on win32 */
1056 #endif /* HAVE_SLEEP */
1060 #define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1061 #endif /* HAVE_USLEEP */
1065 #define random rand /* on win32, for tests only (bad random) */
1066 #endif /* HAVE_RANDOM */
1069 #ifndef HAVE_SRANDOM
1070 #define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1071 #endif /* HAVE_SRANDOM */
1074 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1075 #ifdef HAVE_WINSOCK2_H
1076 #define FD_SET_T (u_int)
1082 #ifndef IPV6_MIN_MTU
1083 #define IPV6_MIN_MTU 1280
1084 #endif /* IPV6_MIN_MTU */
1087 #ifdef MEMCMP_IS_BROKEN
1088 #include "compat/memcmp.h"
1089 #define memcmp memcmp_unbound
1090 int memcmp(const void *x, const void *y, size_t n);
1095 #ifndef HAVE_CTIME_R
1096 #define ctime_r unbound_ctime_r
1097 char *ctime_r(const time_t *timep, char *buf);
1101 #define strsep unbound_strsep
1102 char *strsep(char **stringp, const char *delim);
1105 #ifndef HAVE_ISBLANK
1106 #define isblank unbound_isblank
1110 #if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
1111 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1114 #if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
1115 int inet_pton(int af, const char* src, void* dst);
1118 #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1119 #define strptime unbound_strptime
1121 char *strptime(const char *s, const char *format, struct tm *tm);
1124 #ifdef HAVE_LIBRESSL
1125 # if !HAVE_DECL_STRLCPY
1126 size_t strlcpy(char *dst, const char *src, size_t siz);
1128 # if !HAVE_DECL_STRLCAT
1129 size_t strlcat(char *dst, const char *src, size_t siz);
1131 # if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1132 uint32_t arc4random(void);
1134 # if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1135 uint32_t arc4random_uniform(uint32_t upper_bound);
1137 # if !HAVE_DECL_REALLOCARRAY
1138 void *reallocarray(void *ptr, size_t nmemb, size_t size);
1140 #endif /* HAVE_LIBRESSL */
1141 #ifndef HAVE_ARC4RANDOM
1142 void explicit_bzero(void* buf, size_t len);
1143 int getentropy(void* buf, size_t len);
1144 uint32_t arc4random(void);
1145 void arc4random_buf(void* buf, size_t n);
1146 void _ARC4_LOCK(void);
1147 void _ARC4_UNLOCK(void);
1149 #ifndef HAVE_ARC4RANDOM_UNIFORM
1150 uint32_t arc4random_uniform(uint32_t upper_bound);
1152 #ifdef COMPAT_SHA512
1153 #ifndef SHA512_DIGEST_LENGTH
1154 #define SHA512_BLOCK_LENGTH 128
1155 #define SHA512_DIGEST_LENGTH 64
1156 #define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
1157 typedef struct _SHA512_CTX {
1159 uint64_t bitcount[2];
1160 uint8_t buffer[SHA512_BLOCK_LENGTH];
1162 #endif /* SHA512_DIGEST_LENGTH */
1163 void SHA512_Init(SHA512_CTX*);
1164 void SHA512_Update(SHA512_CTX*, void*, size_t);
1165 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1166 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1167 #endif /* COMPAT_SHA512 */
1171 #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))
1172 /* using version of libevent that is not threadsafe. */
1173 # define LIBEVENT_SIGNAL_PROBLEM 1
1176 #ifndef CHECKED_INET6
1177 # define CHECKED_INET6
1181 # define AF_INET6 28
1183 #endif /* CHECKED_INET6 */
1185 #ifndef HAVE_GETADDRINFO
1186 struct sockaddr_storage;
1187 #include "compat/fake-rfc2553.h"
1190 #ifdef UNBOUND_ALLOC_STATS
1191 # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1192 # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1193 # define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1194 # define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1195 void *unbound_stat_malloc(size_t size);
1196 void *unbound_stat_calloc(size_t nmemb, size_t size);
1197 void unbound_stat_free(void *ptr);
1198 void *unbound_stat_realloc(void *ptr, size_t size);
1199 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1201 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1202 int line, const char* func);
1203 void unbound_stat_free_log(void *ptr, const char* file, int line,
1205 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1206 int line, const char* func);
1207 #elif defined(UNBOUND_ALLOC_LITE)
1208 # include "util/alloc.h"
1209 #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1211 /** default port for DNS traffic. */
1212 #define UNBOUND_DNS_PORT 53
1213 /** default port for unbound control traffic, registered port with IANA,
1214 ub-dns-control 8953/tcp unbound dns nameserver control */
1215 #define UNBOUND_CONTROL_PORT 8953
1216 /** the version of unbound-control that this software implements */
1217 #define UNBOUND_CONTROL_VERSION 1