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 /* Do sha512 definitions in config.h */
8 /* #undef COMPAT_SHA512 */
10 /* Pathname to the Unbound configuration file */
11 #define CONFIGFILE "/var/unbound/unbound.conf"
13 /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
15 /* #undef DARWIN_BROKEN_SETREUID */
17 /* Whether daemon is deprecated */
18 /* #undef DEPRECATED_DAEMON */
20 /* default dnstap socket path */
21 /* #undef DNSTAP_SOCKET_PATH */
23 /* Define if you want to use debug lock checking (slow). */
24 /* #undef ENABLE_LOCK_CHECKS */
26 /* Define this if you enabled-allsymbols from libunbound to link binaries to
27 it for smaller install size, but the libunbound export table is polluted by
29 /* #undef EXPORT_ALL_SYMBOLS */
31 /* Define to 1 if you have the `arc4random' function. */
32 #define HAVE_ARC4RANDOM 1
34 /* Define to 1 if you have the `arc4random_uniform' function. */
35 #define HAVE_ARC4RANDOM_UNIFORM 1
37 /* Define to 1 if you have the <arpa/inet.h> header file. */
38 #define HAVE_ARPA_INET_H 1
40 /* Whether the C compiler accepts the "format" attribute */
41 #define HAVE_ATTR_FORMAT 1
43 /* Whether the C compiler accepts the "unused" attribute */
44 #define HAVE_ATTR_UNUSED 1
46 /* Whether the C compiler accepts the "weak" attribute */
47 #define HAVE_ATTR_WEAK 1
49 /* Define to 1 if you have the `chown' function. */
52 /* Define to 1 if you have the `chroot' function. */
55 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
56 #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
58 /* Define to 1 if you have the `ctime_r' function. */
59 #define HAVE_CTIME_R 1
61 /* Define to 1 if you have the `daemon' function. */
64 /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
66 /* #undef HAVE_DECL_ARC4RANDOM */
68 /* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
70 /* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */
72 /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
74 #define HAVE_DECL_INET_NTOP 1
76 /* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
78 #define HAVE_DECL_INET_PTON 1
80 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
82 #define HAVE_DECL_NID_SECP384R1 1
84 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
86 #define HAVE_DECL_NID_X9_62_PRIME256V1 1
88 /* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
90 /* #undef HAVE_DECL_REALLOCARRAY */
92 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
94 #define HAVE_DECL_SK_SSL_COMP_POP_FREE 1
96 /* Define to 1 if you have the declaration of
97 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
98 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1
100 /* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
102 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 1
104 /* Define to 1 if you have the declaration of `strlcat', and to 0 if you
106 /* #undef HAVE_DECL_STRLCAT */
108 /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
110 /* #undef HAVE_DECL_STRLCPY */
112 /* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
114 #define HAVE_DECL_XML_STOPPARSER 1
116 /* Define to 1 if you have the <dlfcn.h> header file. */
117 #define HAVE_DLFCN_H 1
119 /* Define to 1 if you have the `DSA_SIG_set0' function. */
120 /* #undef HAVE_DSA_SIG_SET0 */
122 /* Define to 1 if you have the <endian.h> header file. */
123 /* #undef HAVE_ENDIAN_H */
125 /* Define to 1 if you have the `endprotoent' function. */
126 #define HAVE_ENDPROTOENT 1
128 /* Define to 1 if you have the `endpwent' function. */
129 #define HAVE_ENDPWENT 1
131 /* Define to 1 if you have the `endservent' function. */
132 #define HAVE_ENDSERVENT 1
134 /* Define to 1 if you have the `ERR_free_strings' function. */
135 #define HAVE_ERR_FREE_STRINGS 1
137 /* Define to 1 if you have the `ERR_load_crypto_strings' function. */
138 #define HAVE_ERR_LOAD_CRYPTO_STRINGS 1
140 /* Define to 1 if you have the `event_base_free' function. */
141 /* #undef HAVE_EVENT_BASE_FREE */
143 /* Define to 1 if you have the `event_base_get_method' function. */
144 /* #undef HAVE_EVENT_BASE_GET_METHOD */
146 /* Define to 1 if you have the `event_base_new' function. */
147 /* #undef HAVE_EVENT_BASE_NEW */
149 /* Define to 1 if you have the `event_base_once' function. */
150 /* #undef HAVE_EVENT_BASE_ONCE */
152 /* Define to 1 if you have the <event.h> header file. */
153 /* #undef HAVE_EVENT_H */
155 /* Define to 1 if you have the `EVP_cleanup' function. */
156 #define HAVE_EVP_CLEANUP 1
158 /* Define to 1 if you have the `EVP_dss1' function. */
159 #define HAVE_EVP_DSS1 1
161 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
162 /* #undef HAVE_EVP_MD_CTX_NEW */
164 /* Define to 1 if you have the `EVP_sha1' function. */
165 #define HAVE_EVP_SHA1 1
167 /* Define to 1 if you have the `EVP_sha256' function. */
168 #define HAVE_EVP_SHA256 1
170 /* Define to 1 if you have the `EVP_sha512' function. */
171 #define HAVE_EVP_SHA512 1
173 /* Define to 1 if you have the `ev_default_loop' function. */
174 /* #undef HAVE_EV_DEFAULT_LOOP */
176 /* Define to 1 if you have the `ev_loop' function. */
177 /* #undef HAVE_EV_LOOP */
179 /* Define to 1 if you have the <expat.h> header file. */
180 #define HAVE_EXPAT_H 1
182 /* Define to 1 if you have the `fcntl' function. */
185 /* Define to 1 if you have the `FIPS_mode' function. */
186 #define HAVE_FIPS_MODE 1
188 /* Define to 1 if you have the `fork' function. */
191 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
192 #define HAVE_FSEEKO 1
194 /* Define to 1 if you have the `fsync' function. */
197 /* Whether getaddrinfo is available */
198 #define HAVE_GETADDRINFO 1
200 /* Define to 1 if you have the `getauxval' function. */
201 /* #undef HAVE_GETAUXVAL */
203 /* Define to 1 if you have the `getentropy' function. */
204 /* #undef HAVE_GETENTROPY */
206 /* Define to 1 if you have the <getopt.h> header file. */
207 #define HAVE_GETOPT_H 1
209 /* Define to 1 if you have the `getpwnam' function. */
210 #define HAVE_GETPWNAM 1
212 /* Define to 1 if you have the `getrlimit' function. */
213 #define HAVE_GETRLIMIT 1
215 /* Define to 1 if you have the `glob' function. */
218 /* Define to 1 if you have the <glob.h> header file. */
219 #define HAVE_GLOB_H 1
221 /* Define to 1 if you have the `gmtime_r' function. */
222 #define HAVE_GMTIME_R 1
224 /* Define to 1 if you have the <grp.h> header file. */
227 /* If you have HMAC_Update */
228 #define HAVE_HMAC_UPDATE 1
230 /* Define to 1 if you have the `inet_aton' function. */
231 #define HAVE_INET_ATON 1
233 /* Define to 1 if you have the `inet_ntop' function. */
234 #define HAVE_INET_NTOP 1
236 /* Define to 1 if you have the `inet_pton' function. */
237 #define HAVE_INET_PTON 1
239 /* Define to 1 if you have the `initgroups' function. */
240 #define HAVE_INITGROUPS 1
242 /* Define to 1 if you have the <inttypes.h> header file. */
243 #define HAVE_INTTYPES_H 1
245 /* if the function 'ioctlsocket' is available */
246 /* #undef HAVE_IOCTLSOCKET */
248 /* Define to 1 if you have the <iphlpapi.h> header file. */
249 /* #undef HAVE_IPHLPAPI_H */
251 /* Define to 1 if you have the `isblank' function. */
252 #define HAVE_ISBLANK 1
254 /* Define to 1 if you have the `kill' function. */
257 /* Define if we have LibreSSL */
258 /* #undef HAVE_LIBRESSL */
260 /* Define to 1 if you have the `localtime_r' function. */
261 #define HAVE_LOCALTIME_R 1
263 /* Define to 1 if you have the <login_cap.h> header file. */
264 #define HAVE_LOGIN_CAP_H 1
266 /* If have GNU libc compatible malloc */
267 #define HAVE_MALLOC 1
269 /* Define to 1 if you have the `memmove' function. */
270 #define HAVE_MEMMOVE 1
272 /* Define to 1 if you have the <memory.h> header file. */
273 #define HAVE_MEMORY_H 1
275 /* Define to 1 if you have the <netdb.h> header file. */
276 #define HAVE_NETDB_H 1
278 /* Define to 1 if you have the <netinet/in.h> header file. */
279 #define HAVE_NETINET_IN_H 1
281 /* Define to 1 if you have the <netinet/tcp.h> header file. */
282 #define HAVE_NETINET_TCP_H 1
284 /* Use libnettle for crypto */
285 /* #undef HAVE_NETTLE */
287 /* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
288 /* #undef HAVE_NETTLE_DSA_COMPAT_H */
290 /* Use libnss for crypto */
291 /* #undef HAVE_NSS */
293 /* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
294 #define HAVE_OPENSSL_ADD_ALL_DIGESTS 1
296 /* Define to 1 if you have the <openssl/bn.h> header file. */
297 #define HAVE_OPENSSL_BN_H 1
299 /* Define to 1 if you have the `OPENSSL_config' function. */
300 #define HAVE_OPENSSL_CONFIG 1
302 /* Define to 1 if you have the <openssl/conf.h> header file. */
303 #define HAVE_OPENSSL_CONF_H 1
305 /* Define to 1 if you have the <openssl/dh.h> header file. */
306 #define HAVE_OPENSSL_DH_H 1
308 /* Define to 1 if you have the <openssl/dsa.h> header file. */
309 #define HAVE_OPENSSL_DSA_H 1
311 /* Define to 1 if you have the <openssl/engine.h> header file. */
312 #define HAVE_OPENSSL_ENGINE_H 1
314 /* Define to 1 if you have the <openssl/err.h> header file. */
315 #define HAVE_OPENSSL_ERR_H 1
317 /* Define to 1 if you have the `OPENSSL_init_crypto' function. */
318 /* #undef HAVE_OPENSSL_INIT_CRYPTO */
320 /* Define to 1 if you have the `OPENSSL_init_ssl' function. */
321 /* #undef HAVE_OPENSSL_INIT_SSL */
323 /* Define to 1 if you have the <openssl/rand.h> header file. */
324 #define HAVE_OPENSSL_RAND_H 1
326 /* Define to 1 if you have the <openssl/rsa.h> header file. */
327 #define HAVE_OPENSSL_RSA_H 1
329 /* Define to 1 if you have the <openssl/ssl.h> header file. */
330 #define HAVE_OPENSSL_SSL_H 1
332 /* Define if you have POSIX threads libraries and header files. */
333 #define HAVE_PTHREAD 1
335 /* Have PTHREAD_PRIO_INHERIT. */
336 #define HAVE_PTHREAD_PRIO_INHERIT 1
338 /* Define to 1 if the system has the type `pthread_rwlock_t'. */
339 #define HAVE_PTHREAD_RWLOCK_T 1
341 /* Define to 1 if the system has the type `pthread_spinlock_t'. */
342 #define HAVE_PTHREAD_SPINLOCK_T 1
344 /* Define to 1 if you have the <pwd.h> header file. */
347 /* Define if you have Python libraries and header files. */
348 /* #undef HAVE_PYTHON */
350 /* Define to 1 if you have the `random' function. */
351 #define HAVE_RANDOM 1
353 /* Define to 1 if you have the `RAND_cleanup' function. */
354 #define HAVE_RAND_CLEANUP 1
356 /* Define to 1 if you have the `reallocarray' function. */
357 #define HAVE_REALLOCARRAY 1
359 /* Define to 1 if you have the `recvmsg' function. */
360 #define HAVE_RECVMSG 1
362 /* Define to 1 if you have the `sendmsg' function. */
363 #define HAVE_SENDMSG 1
365 /* Define to 1 if you have the `setregid' function. */
366 /* #undef HAVE_SETREGID */
368 /* Define to 1 if you have the `setresgid' function. */
369 #define HAVE_SETRESGID 1
371 /* Define to 1 if you have the `setresuid' function. */
372 #define HAVE_SETRESUID 1
374 /* Define to 1 if you have the `setreuid' function. */
375 /* #undef HAVE_SETREUID */
377 /* Define to 1 if you have the `setrlimit' function. */
378 #define HAVE_SETRLIMIT 1
380 /* Define to 1 if you have the `setsid' function. */
381 #define HAVE_SETSID 1
383 /* Define to 1 if you have the `setusercontext' function. */
384 #define HAVE_SETUSERCONTEXT 1
386 /* Define to 1 if you have the `SHA512_Update' function. */
387 /* #undef HAVE_SHA512_UPDATE */
389 /* Define to 1 if you have the `sigprocmask' function. */
390 #define HAVE_SIGPROCMASK 1
392 /* Define to 1 if you have the `sleep' function. */
395 /* Define to 1 if you have the `snprintf' function. */
396 #define HAVE_SNPRINTF 1
398 /* Define to 1 if you have the `socketpair' function. */
399 #define HAVE_SOCKETPAIR 1
401 /* Using Solaris threads */
402 /* #undef HAVE_SOLARIS_THREADS */
404 /* Define to 1 if you have the `srandom' function. */
405 #define HAVE_SRANDOM 1
407 /* Define if you have the SSL libraries installed. */
408 #define HAVE_SSL /**/
410 /* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
411 /* #undef HAVE_SSL_CTX_SET_SECURITY_LEVEL */
413 /* Define to 1 if you have the <stdarg.h> header file. */
414 #define HAVE_STDARG_H 1
416 /* Define to 1 if you have the <stdbool.h> header file. */
417 #define HAVE_STDBOOL_H 1
419 /* Define to 1 if you have the <stdint.h> header file. */
420 #define HAVE_STDINT_H 1
422 /* Define to 1 if you have the <stdlib.h> header file. */
423 #define HAVE_STDLIB_H 1
425 /* Define to 1 if you have the `strftime' function. */
426 #define HAVE_STRFTIME 1
428 /* Define to 1 if you have the <strings.h> header file. */
429 #define HAVE_STRINGS_H 1
431 /* Define to 1 if you have the <string.h> header file. */
432 #define HAVE_STRING_H 1
434 /* Define to 1 if you have the `strlcat' function. */
435 #define HAVE_STRLCAT 1
437 /* Define to 1 if you have the `strlcpy' function. */
438 #define HAVE_STRLCPY 1
440 /* Define to 1 if you have the `strptime' function. */
441 #define HAVE_STRPTIME 1
443 /* Define to 1 if you have the `strsep' function. */
444 #define HAVE_STRSEP 1
446 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
447 /* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */
449 /* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
450 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
452 /* Define if you have Swig libraries and header files. */
453 /* #undef HAVE_SWIG */
455 /* Define to 1 if you have the <syslog.h> header file. */
456 #define HAVE_SYSLOG_H 1
458 /* Define to 1 if systemd should be used */
459 /* #undef HAVE_SYSTEMD */
461 /* Define to 1 if you have the <sys/param.h> header file. */
462 #define HAVE_SYS_PARAM_H 1
464 /* Define to 1 if you have the <sys/resource.h> header file. */
465 #define HAVE_SYS_RESOURCE_H 1
467 /* Define to 1 if you have the <sys/sha2.h> header file. */
468 /* #undef HAVE_SYS_SHA2_H */
470 /* Define to 1 if you have the <sys/socket.h> header file. */
471 #define HAVE_SYS_SOCKET_H 1
473 /* Define to 1 if you have the <sys/stat.h> header file. */
474 #define HAVE_SYS_STAT_H 1
476 /* Define to 1 if you have the <sys/sysctl.h> header file. */
477 /* #undef HAVE_SYS_SYSCTL_H */
479 /* Define to 1 if you have the <sys/types.h> header file. */
480 #define HAVE_SYS_TYPES_H 1
482 /* Define to 1 if you have the <sys/uio.h> header file. */
483 #define HAVE_SYS_UIO_H 1
485 /* Define to 1 if you have the <sys/un.h> header file. */
486 #define HAVE_SYS_UN_H 1
488 /* Define to 1 if you have the <sys/wait.h> header file. */
489 #define HAVE_SYS_WAIT_H 1
491 /* Define to 1 if you have the <time.h> header file. */
492 #define HAVE_TIME_H 1
494 /* Define to 1 if you have the `tzset' function. */
497 /* Define to 1 if you have the <unistd.h> header file. */
498 #define HAVE_UNISTD_H 1
500 /* Define to 1 if you have the `usleep' function. */
501 #define HAVE_USLEEP 1
503 /* Define to 1 if you have the `vfork' function. */
506 /* Define to 1 if you have the <vfork.h> header file. */
507 /* #undef HAVE_VFORK_H */
509 /* Define to 1 if you have the <windows.h> header file. */
510 /* #undef HAVE_WINDOWS_H */
512 /* Using Windows threads */
513 /* #undef HAVE_WINDOWS_THREADS */
515 /* Define to 1 if you have the <winsock2.h> header file. */
516 /* #undef HAVE_WINSOCK2_H */
518 /* Define to 1 if `fork' works. */
519 #define HAVE_WORKING_FORK 1
521 /* Define to 1 if `vfork' works. */
522 #define HAVE_WORKING_VFORK 1
524 /* Define to 1 if you have the `writev' function. */
525 #define HAVE_WRITEV 1
527 /* Define to 1 if you have the <ws2tcpip.h> header file. */
528 /* #undef HAVE_WS2TCPIP_H */
530 /* Define to 1 if you have the `_beginthreadex' function. */
531 /* #undef HAVE__BEGINTHREADEX */
533 /* if lex has yylex_destroy */
534 #define LEX_HAS_YYLEX_DESTROY 1
536 /* Define to the sub-directory where libtool stores uninstalled libraries. */
537 #define LT_OBJDIR ".libs/"
539 /* Define to the maximum message length to pass to syslog. */
540 #define MAXSYSLOGMSGLEN 10240
542 /* Define if memcmp() does not compare unsigned bytes */
543 /* #undef MEMCMP_IS_BROKEN */
545 /* Define if mkdir has one argument. */
546 /* #undef MKDIR_HAS_ONE_ARG */
548 /* Define if the network stack does not fully support nonblocking io (causes
549 lower performance). */
550 /* #undef NONBLOCKING_IS_BROKEN */
552 /* Put -D_ALL_SOURCE define in config.h */
553 /* #undef OMITTED__D_ALL_SOURCE */
555 /* Put -D_BSD_SOURCE define in config.h */
556 /* #undef OMITTED__D_BSD_SOURCE */
558 /* Put -D_DEFAULT_SOURCE define in config.h */
559 /* #undef OMITTED__D_DEFAULT_SOURCE */
561 /* Put -D_GNU_SOURCE define in config.h */
562 /* #undef OMITTED__D_GNU_SOURCE */
564 /* Put -D_LARGEFILE_SOURCE=1 define in config.h */
565 /* #undef OMITTED__D_LARGEFILE_SOURCE_1 */
567 /* Put -D_POSIX_C_SOURCE=200112 define in config.h */
568 /* #undef OMITTED__D_POSIX_C_SOURCE_200112 */
570 /* Put -D_XOPEN_SOURCE=600 define in config.h */
571 /* #undef OMITTED__D_XOPEN_SOURCE_600 */
573 /* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
574 /* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */
576 /* Put -D__EXTENSIONS__ define in config.h */
577 /* #undef OMITTED__D__EXTENSIONS__ */
579 /* Define to the address where bug reports for this package should be sent. */
580 #define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl"
582 /* Define to the full name of this package. */
583 #define PACKAGE_NAME "unbound"
585 /* Define to the full name and version of this package. */
586 #define PACKAGE_STRING "unbound 1.6.1"
588 /* Define to the one symbol short name of this package. */
589 #define PACKAGE_TARNAME "unbound"
591 /* Define to the home page for this package. */
592 #define PACKAGE_URL ""
594 /* Define to the version of this package. */
595 #define PACKAGE_VERSION "1.6.1"
597 /* default pidfile location */
598 #define PIDFILE "/var/unbound/unbound.pid"
600 /* Define to necessary symbol if this constant uses a non-standard name on
602 /* #undef PTHREAD_CREATE_JOINABLE */
604 /* Define as the return type of signal handlers (`int' or `void'). */
605 #define RETSIGTYPE void
607 /* default rootkey location */
608 #define ROOT_ANCHOR_FILE "/var/unbound/root.key"
610 /* default rootcert location */
611 #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
613 /* version number for resource files */
614 #define RSRC_PACKAGE_VERSION 1,6,1,0
616 /* Directory to chdir to */
617 #define RUN_DIR "/var/unbound"
620 #define SHARE_DIR "/var/unbound"
622 /* The size of `time_t', as computed by sizeof. */
623 #define SIZEOF_TIME_T 8
625 /* define if (v)snprintf does not return length needed, (but length used) */
626 /* #undef SNPRINTF_RET_BROKEN */
628 /* Define to 1 if you have the ANSI C header files. */
629 #define STDC_HEADERS 1
631 /* use default strptime. */
632 #define STRPTIME_WORKS 1
634 /* Use win32 resources and API */
635 /* #undef UB_ON_WINDOWS */
637 /* default username */
638 #define UB_USERNAME "unbound"
640 /* use to enable lightweight alloc assertions, for debug use */
641 /* #undef UNBOUND_ALLOC_LITE */
643 /* use malloc not regions, for debug use */
644 /* #undef UNBOUND_ALLOC_NONREGIONAL */
646 /* use statistics for allocs and frees, for debug use */
647 /* #undef UNBOUND_ALLOC_STATS */
649 /* define this to enable debug checks. */
650 /* #undef UNBOUND_DEBUG */
652 /* Define to 1 to use cachedb support */
653 /* #undef USE_CACHEDB */
655 /* Define to 1 to enable dnstap support */
656 /* #undef USE_DNSTAP */
658 /* Define this to enable DSA support. */
661 /* Define this to enable ECDSA support. */
664 /* Define this to enable an EVP workaround for older openssl */
665 /* #undef USE_ECDSA_EVP_WORKAROUND */
667 /* Define this to enable GOST support. */
670 /* Define if you want to use internal select based events */
671 #define USE_MINI_EVENT 1
673 /* Define this to enable client TCP Fast Open. */
674 /* #undef USE_MSG_FASTOPEN */
676 /* Define this to enable client TCP Fast Open. */
677 /* #undef USE_OSX_MSG_FASTOPEN */
679 /* Define this to enable SHA256 and SHA512 support. */
682 /* Enable extensions on AIX 3, Interix. */
684 # define _ALL_SOURCE 1
686 /* Enable GNU extensions on systems that have them. */
688 # define _GNU_SOURCE 1
690 /* Enable threading extensions on Solaris. */
691 #ifndef _POSIX_PTHREAD_SEMANTICS
692 # define _POSIX_PTHREAD_SEMANTICS 1
694 /* Enable extensions on HP NonStop. */
695 #ifndef _TANDEM_SOURCE
696 # define _TANDEM_SOURCE 1
698 /* Enable general extensions on Solaris. */
699 #ifndef __EXTENSIONS__
700 # define __EXTENSIONS__ 1
704 /* Define this to enable server TCP Fast Open. */
705 /* #undef USE_TCP_FASTOPEN */
707 /* Whether the windows socket API is used */
708 /* #undef USE_WINSOCK */
710 /* the version of the windows API enabled */
711 #define WINVER 0x0502
713 /* Define if you want Python module. */
714 /* #undef WITH_PYTHONMODULE */
716 /* Define if you want PyUnbound. */
717 /* #undef WITH_PYUNBOUND */
719 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
721 #define YYTEXT_POINTER 1
723 /* Enable large inode numbers on Mac OS X 10.5. */
724 #ifndef _DARWIN_USE_64_BIT_INODE
725 # define _DARWIN_USE_64_BIT_INODE 1
728 /* Number of bits in a file offset, on hosts where this is settable. */
729 /* #undef _FILE_OFFSET_BITS */
731 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
732 /* #undef _LARGEFILE_SOURCE */
734 /* Define for large files, on AIX-style hosts. */
735 /* #undef _LARGE_FILES */
737 /* Define to 1 if on MINIX. */
740 /* Enable for compile on Minix */
741 /* #undef _NETBSD_SOURCE */
743 /* Define to 2 if the system does not provide POSIX.1 features except with
745 /* #undef _POSIX_1_SOURCE */
747 /* Define to 1 if you need to in order for `stat' and other things to work. */
748 /* #undef _POSIX_SOURCE */
750 /* Define to empty if `const' does not conform to ANSI C. */
753 /* Define to `int' if <sys/types.h> doesn't define. */
757 /* #undef in_addr_t */
760 /* #undef in_port_t */
762 /* Define to `__inline__' or `__inline' if that's what the C compiler
763 calls it, or to nothing if 'inline' is not supported under any name. */
768 /* Define to `short' if <sys/types.h> does not define. */
771 /* Define to `int' if <sys/types.h> does not define. */
774 /* Define to `long long' if <sys/types.h> does not define. */
777 /* Define to `signed char' if <sys/types.h> does not define. */
780 /* Define if replacement function should be used. */
783 /* Define to `long int' if <sys/types.h> does not define. */
786 /* Define to `int' if <sys/types.h> does not define. */
789 /* Define to 'int' if not defined */
792 /* Define to `unsigned int' if <sys/types.h> does not define. */
795 /* Define to 'int' if not defined */
796 /* #undef socklen_t */
798 /* Define to `int' if <sys/types.h> does not define. */
801 /* Define to 'unsigned char if not defined */
804 /* Define to `int' if <sys/types.h> doesn't define. */
807 /* Define to `unsigned short' if <sys/types.h> does not define. */
808 /* #undef uint16_t */
810 /* Define to `unsigned int' if <sys/types.h> does not define. */
811 /* #undef uint32_t */
813 /* Define to `unsigned long long' if <sys/types.h> does not define. */
814 /* #undef uint64_t */
816 /* Define to `unsigned char' if <sys/types.h> does not define. */
819 /* Define as `fork' if `vfork' does not work. */
822 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
823 #define _GNU_SOURCE 1
826 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
827 #define _BSD_SOURCE 1
830 #if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
831 #define _DEFAULT_SOURCE 1
834 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
835 #define __EXTENSIONS__ 1
838 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
839 #define _POSIX_C_SOURCE 200112
842 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
843 #define _XOPEN_SOURCE 600
846 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
847 #define _XOPEN_SOURCE_EXTENDED 1
850 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
851 #define _ALL_SOURCE 1
854 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
855 #define _LARGEFILE_SOURCE 1
861 #ifndef UNBOUND_DEBUG
865 /** Use small-ldns codebase */
868 # define LDNS_BUILD_CONFIG_HAVE_SSL 1
892 #include <sys/param.h>
895 #ifdef HAVE_SYS_SOCKET_H
896 #include <sys/socket.h>
899 #ifdef HAVE_SYS_UIO_H
903 #ifdef HAVE_NETINET_IN_H
904 #include <netinet/in.h>
907 #ifdef HAVE_NETINET_TCP_H
908 #include <netinet/tcp.h>
911 #ifdef HAVE_ARPA_INET_H
912 #include <arpa/inet.h>
915 #ifdef HAVE_WINSOCK2_H
916 #include <winsock2.h>
919 #ifdef HAVE_WS2TCPIP_H
920 #include <ws2tcpip.h>
926 #define ARG_LL "%I64"
930 #define AF_LOCAL AF_UNIX
935 #ifdef HAVE_ATTR_FORMAT
936 # define ATTR_FORMAT(archetype, string_index, first_to_check) \
937 __attribute__ ((format (archetype, string_index, first_to_check)))
938 #else /* !HAVE_ATTR_FORMAT */
939 # define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
940 #endif /* !HAVE_ATTR_FORMAT */
944 # define ATTR_UNUSED(x) x
945 #elif defined(__cplusplus)
946 # define ATTR_UNUSED(x)
947 #elif defined(HAVE_ATTR_UNUSED)
948 # define ATTR_UNUSED(x) x __attribute__((unused))
949 #else /* !HAVE_ATTR_UNUSED */
950 # define ATTR_UNUSED(x) x
951 #endif /* !HAVE_ATTR_UNUSED */
957 #endif /* HAVE_FSEEKO */
960 #ifndef MAXHOSTNAMELEN
961 #define MAXHOSTNAMELEN 256
964 #if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
965 #define snprintf snprintf_unbound
966 #define vsnprintf vsnprintf_unbound
968 int snprintf (char *str, size_t count, const char *fmt, ...);
969 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
970 #endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
972 #ifndef HAVE_INET_PTON
973 #define inet_pton inet_pton_unbound
974 int inet_pton(int af, const char* src, void* dst);
975 #endif /* HAVE_INET_PTON */
978 #ifndef HAVE_INET_NTOP
979 #define inet_ntop inet_ntop_unbound
980 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
984 #ifndef HAVE_INET_ATON
985 #define inet_aton inet_aton_unbound
986 int inet_aton(const char *cp, struct in_addr *addr);
991 #define memmove memmove_unbound
992 void *memmove(void *dest, const void *src, size_t n);
997 #define strlcat strlcat_unbound
998 size_t strlcat(char *dst, const char *src, size_t siz);
1002 #ifndef HAVE_STRLCPY
1003 #define strlcpy strlcpy_unbound
1004 size_t strlcpy(char *dst, const char *src, size_t siz);
1008 #ifndef HAVE_GMTIME_R
1009 #define gmtime_r gmtime_r_unbound
1010 struct tm *gmtime_r(const time_t *timep, struct tm *result);
1014 #ifndef HAVE_REALLOCARRAY
1015 #define reallocarray reallocarrayunbound
1016 void* reallocarray(void *ptr, size_t nmemb, size_t size);
1020 #if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1021 #define sleep(x) Sleep((x)*1000) /* on win32 */
1022 #endif /* HAVE_SLEEP */
1026 #define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1027 #endif /* HAVE_USLEEP */
1031 #define random rand /* on win32, for tests only (bad random) */
1032 #endif /* HAVE_RANDOM */
1035 #ifndef HAVE_SRANDOM
1036 #define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1037 #endif /* HAVE_SRANDOM */
1040 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1041 #ifdef HAVE_WINSOCK2_H
1042 #define FD_SET_T (u_int)
1048 #ifndef IPV6_MIN_MTU
1049 #define IPV6_MIN_MTU 1280
1050 #endif /* IPV6_MIN_MTU */
1053 #ifdef MEMCMP_IS_BROKEN
1054 #include "compat/memcmp.h"
1055 #define memcmp memcmp_unbound
1056 int memcmp(const void *x, const void *y, size_t n);
1061 #ifndef HAVE_CTIME_R
1062 #define ctime_r unbound_ctime_r
1063 char *ctime_r(const time_t *timep, char *buf);
1067 #define strsep unbound_strsep
1068 char *strsep(char **stringp, const char *delim);
1071 #ifndef HAVE_ISBLANK
1072 #define isblank unbound_isblank
1076 #if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
1077 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1080 #if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
1081 int inet_pton(int af, const char* src, void* dst);
1084 #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1085 #define strptime unbound_strptime
1087 char *strptime(const char *s, const char *format, struct tm *tm);
1090 #ifdef HAVE_LIBRESSL
1091 # if !HAVE_DECL_STRLCPY
1092 size_t strlcpy(char *dst, const char *src, size_t siz);
1094 # if !HAVE_DECL_STRLCAT
1095 size_t strlcat(char *dst, const char *src, size_t siz);
1097 # if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1098 uint32_t arc4random(void);
1100 # if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1101 uint32_t arc4random_uniform(uint32_t upper_bound);
1103 # if !HAVE_DECL_REALLOCARRAY
1104 void *reallocarray(void *ptr, size_t nmemb, size_t size);
1106 #endif /* HAVE_LIBRESSL */
1107 #ifndef HAVE_ARC4RANDOM
1108 void explicit_bzero(void* buf, size_t len);
1109 int getentropy(void* buf, size_t len);
1110 uint32_t arc4random(void);
1111 void arc4random_buf(void* buf, size_t n);
1112 void _ARC4_LOCK(void);
1113 void _ARC4_UNLOCK(void);
1115 #ifndef HAVE_ARC4RANDOM_UNIFORM
1116 uint32_t arc4random_uniform(uint32_t upper_bound);
1118 #ifdef COMPAT_SHA512
1119 #ifndef SHA512_DIGEST_LENGTH
1120 #define SHA512_BLOCK_LENGTH 128
1121 #define SHA512_DIGEST_LENGTH 64
1122 #define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
1123 typedef struct _SHA512_CTX {
1125 uint64_t bitcount[2];
1126 uint8_t buffer[SHA512_BLOCK_LENGTH];
1128 #endif /* SHA512_DIGEST_LENGTH */
1129 void SHA512_Init(SHA512_CTX*);
1130 void SHA512_Update(SHA512_CTX*, void*, size_t);
1131 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1132 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1133 #endif /* COMPAT_SHA512 */
1137 #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))
1138 /* using version of libevent that is not threadsafe. */
1139 # define LIBEVENT_SIGNAL_PROBLEM 1
1142 #ifndef CHECKED_INET6
1143 # define CHECKED_INET6
1147 # define AF_INET6 28
1149 #endif /* CHECKED_INET6 */
1151 #ifndef HAVE_GETADDRINFO
1152 struct sockaddr_storage;
1153 #include "compat/fake-rfc2553.h"
1156 #ifdef UNBOUND_ALLOC_STATS
1157 # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1158 # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1159 # define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1160 # define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1161 void *unbound_stat_malloc(size_t size);
1162 void *unbound_stat_calloc(size_t nmemb, size_t size);
1163 void unbound_stat_free(void *ptr);
1164 void *unbound_stat_realloc(void *ptr, size_t size);
1165 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1167 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1168 int line, const char* func);
1169 void unbound_stat_free_log(void *ptr, const char* file, int line,
1171 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1172 int line, const char* func);
1173 #elif defined(UNBOUND_ALLOC_LITE)
1174 # include "util/alloc.h"
1175 #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1177 /** default port for DNS traffic. */
1178 #define UNBOUND_DNS_PORT 53
1179 /** default port for unbound control traffic, registered port with IANA,
1180 ub-dns-control 8953/tcp unbound dns nameserver control */
1181 #define UNBOUND_CONTROL_PORT 8953
1182 /** the version of unbound-control that this software implements */
1183 #define UNBOUND_CONTROL_VERSION 1