1 /* config.h. Generated from config.h.in by configure. */
2 /* config.h.in. Generated from configure.ac by autoheader. */
4 /* apply the noreturn attribute to a function that exits the program */
5 #define ATTR_NORETURN __attribute__((__noreturn__))
7 /* apply the weak attribute to a symbol */
8 #define ATTR_WEAK __attribute__((weak))
10 /* Directory to chroot to */
11 #define CHROOT_DIR "/var/unbound"
13 /* Define this to enable client subnet option. */
14 /* #undef CLIENT_SUBNET */
16 /* Do sha512 definitions in config.h */
17 /* #undef COMPAT_SHA512 */
19 /* Pathname to the Unbound configuration file */
20 #define CONFIGFILE "/var/unbound/unbound.conf"
22 /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
24 /* #undef DARWIN_BROKEN_SETREUID */
26 /* Whether daemon is deprecated */
27 /* #undef DEPRECATED_DAEMON */
29 /* default dnstap socket path */
30 /* #undef DNSTAP_SOCKET_PATH */
32 /* Define if you want to use debug lock checking (slow). */
33 /* #undef ENABLE_LOCK_CHECKS */
35 /* Define this if you enabled-allsymbols from libunbound to link binaries to
36 it for smaller install size, but the libunbound export table is polluted by
38 /* #undef EXPORT_ALL_SYMBOLS */
40 /* Define to 1 if you have the `accept4' function. */
41 #define HAVE_ACCEPT4 1
43 /* Define to 1 if you have the `arc4random' function. */
44 #define HAVE_ARC4RANDOM 1
46 /* Define to 1 if you have the `arc4random_uniform' function. */
47 #define HAVE_ARC4RANDOM_UNIFORM 1
49 /* Define to 1 if you have the <arpa/inet.h> header file. */
50 #define HAVE_ARPA_INET_H 1
52 /* Whether the C compiler accepts the "format" attribute */
53 #define HAVE_ATTR_FORMAT 1
55 /* Whether the C compiler accepts the "noreturn" attribute */
56 #define HAVE_ATTR_NORETURN 1
58 /* Whether the C compiler accepts the "unused" attribute */
59 #define HAVE_ATTR_UNUSED 1
61 /* Whether the C compiler accepts the "weak" attribute */
62 #define HAVE_ATTR_WEAK 1
64 /* Define to 1 if you have the `chown' function. */
67 /* Define to 1 if you have the `chroot' function. */
70 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
71 /* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */
73 /* Define to 1 if you have the `ctime_r' function. */
74 #define HAVE_CTIME_R 1
76 /* Define to 1 if you have the `daemon' function. */
79 /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
81 /* #undef HAVE_DECL_ARC4RANDOM */
83 /* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
85 /* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */
87 /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
89 #define HAVE_DECL_INET_NTOP 1
91 /* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
93 #define HAVE_DECL_INET_PTON 1
95 /* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
97 #define HAVE_DECL_NID_ED25519 1
99 /* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you
101 #define HAVE_DECL_NID_ED448 1
103 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
105 #define HAVE_DECL_NID_SECP384R1 1
107 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
109 #define HAVE_DECL_NID_X9_62_PRIME256V1 1
111 /* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
113 /* #undef HAVE_DECL_REALLOCARRAY */
115 /* Define to 1 if you have the declaration of `redisConnect', and to 0 if you
117 /* #undef HAVE_DECL_REDISCONNECT */
119 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
121 #define HAVE_DECL_SK_SSL_COMP_POP_FREE 1
123 /* Define to 1 if you have the declaration of
124 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
125 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1
127 /* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
129 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 1
131 /* Define to 1 if you have the declaration of `strlcat', and to 0 if you
133 /* #undef HAVE_DECL_STRLCAT */
135 /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
137 /* #undef HAVE_DECL_STRLCPY */
139 /* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
141 #define HAVE_DECL_XML_STOPPARSER 1
143 /* Define to 1 if you have the <dlfcn.h> header file. */
144 #define HAVE_DLFCN_H 1
146 /* Define to 1 if you have the `DSA_SIG_set0' function. */
147 #define HAVE_DSA_SIG_SET0 1
149 /* Define to 1 if you have the <endian.h> header file. */
150 /* #undef HAVE_ENDIAN_H */
152 /* Define to 1 if you have the `endprotoent' function. */
153 #define HAVE_ENDPROTOENT 1
155 /* Define to 1 if you have the `endpwent' function. */
156 #define HAVE_ENDPWENT 1
158 /* Define to 1 if you have the `endservent' function. */
159 #define HAVE_ENDSERVENT 1
161 /* Define to 1 if you have the `ERR_free_strings' function. */
162 /* #undef HAVE_ERR_FREE_STRINGS */
164 /* Define to 1 if you have the `ERR_load_crypto_strings' function. */
165 /* #undef HAVE_ERR_LOAD_CRYPTO_STRINGS */
167 /* Define to 1 if you have the `event_base_free' function. */
168 /* #undef HAVE_EVENT_BASE_FREE */
170 /* Define to 1 if you have the `event_base_get_method' function. */
171 /* #undef HAVE_EVENT_BASE_GET_METHOD */
173 /* Define to 1 if you have the `event_base_new' function. */
174 /* #undef HAVE_EVENT_BASE_NEW */
176 /* Define to 1 if you have the `event_base_once' function. */
177 /* #undef HAVE_EVENT_BASE_ONCE */
179 /* Define to 1 if you have the <event.h> header file. */
180 /* #undef HAVE_EVENT_H */
182 /* Define to 1 if you have the `EVP_cleanup' function. */
183 /* #undef HAVE_EVP_CLEANUP */
185 /* Define to 1 if you have the `EVP_DigestVerify' function. */
186 #define HAVE_EVP_DIGESTVERIFY 1
188 /* Define to 1 if you have the `EVP_dss1' function. */
189 /* #undef HAVE_EVP_DSS1 */
191 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
192 #define HAVE_EVP_MD_CTX_NEW 1
194 /* Define to 1 if you have the `EVP_sha1' function. */
195 #define HAVE_EVP_SHA1 1
197 /* Define to 1 if you have the `EVP_sha256' function. */
198 #define HAVE_EVP_SHA256 1
200 /* Define to 1 if you have the `EVP_sha512' function. */
201 #define HAVE_EVP_SHA512 1
203 /* Define to 1 if you have the `ev_default_loop' function. */
204 /* #undef HAVE_EV_DEFAULT_LOOP */
206 /* Define to 1 if you have the `ev_loop' function. */
207 /* #undef HAVE_EV_LOOP */
209 /* Define to 1 if you have the <expat.h> header file. */
210 #define HAVE_EXPAT_H 1
212 /* Define to 1 if you have the `explicit_bzero' function. */
213 #define HAVE_EXPLICIT_BZERO 1
215 /* Define to 1 if you have the `fcntl' function. */
218 /* Define to 1 if you have the `FIPS_mode' function. */
219 #define HAVE_FIPS_MODE 1
221 /* Define to 1 if you have the `fork' function. */
224 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
225 #define HAVE_FSEEKO 1
227 /* Define to 1 if you have the `fsync' function. */
230 /* Whether getaddrinfo is available */
231 #define HAVE_GETADDRINFO 1
233 /* Define to 1 if you have the `getauxval' function. */
234 /* #undef HAVE_GETAUXVAL */
236 /* Define to 1 if you have the `getentropy' function. */
237 /* #undef HAVE_GETENTROPY */
239 /* Define to 1 if you have the <getopt.h> header file. */
240 #define HAVE_GETOPT_H 1
242 /* Define to 1 if you have the `getpwnam' function. */
243 #define HAVE_GETPWNAM 1
245 /* Define to 1 if you have the `getrlimit' function. */
246 #define HAVE_GETRLIMIT 1
248 /* Define to 1 if you have the `glob' function. */
251 /* Define to 1 if you have the <glob.h> header file. */
252 #define HAVE_GLOB_H 1
254 /* Define to 1 if you have the `gmtime_r' function. */
255 #define HAVE_GMTIME_R 1
257 /* Define to 1 if you have the <grp.h> header file. */
260 /* Define to 1 if you have the <hiredis/hiredis.h> header file. */
261 /* #undef HAVE_HIREDIS_HIREDIS_H */
263 /* If you have HMAC_Update */
264 #define HAVE_HMAC_UPDATE 1
266 /* Define to 1 if you have the `inet_aton' function. */
267 #define HAVE_INET_ATON 1
269 /* Define to 1 if you have the `inet_ntop' function. */
270 #define HAVE_INET_NTOP 1
272 /* Define to 1 if you have the `inet_pton' function. */
273 #define HAVE_INET_PTON 1
275 /* Define to 1 if you have the `initgroups' function. */
276 #define HAVE_INITGROUPS 1
278 /* Define to 1 if you have the <inttypes.h> header file. */
279 #define HAVE_INTTYPES_H 1
281 /* if the function 'ioctlsocket' is available */
282 /* #undef HAVE_IOCTLSOCKET */
284 /* Define to 1 if you have the <iphlpapi.h> header file. */
285 /* #undef HAVE_IPHLPAPI_H */
287 /* Define to 1 if you have the `isblank' function. */
288 #define HAVE_ISBLANK 1
290 /* Define to 1 if you have the `kill' function. */
293 /* Define to 1 if you have the <libkern/OSByteOrder.h> header file. */
294 /* #undef HAVE_LIBKERN_OSBYTEORDER_H */
296 /* Define if we have LibreSSL */
297 /* #undef HAVE_LIBRESSL */
299 /* Define to 1 if you have the `localtime_r' function. */
300 #define HAVE_LOCALTIME_R 1
302 /* Define to 1 if you have the <login_cap.h> header file. */
303 #define HAVE_LOGIN_CAP_H 1
305 /* If have GNU libc compatible malloc */
306 #define HAVE_MALLOC 1
308 /* Define to 1 if you have the `memmove' function. */
309 #define HAVE_MEMMOVE 1
311 /* Define to 1 if you have the <memory.h> header file. */
312 #define HAVE_MEMORY_H 1
314 /* Define to 1 if you have the <netdb.h> header file. */
315 #define HAVE_NETDB_H 1
317 /* Define to 1 if you have the <netinet/in.h> header file. */
318 #define HAVE_NETINET_IN_H 1
320 /* Define to 1 if you have the <netinet/tcp.h> header file. */
321 #define HAVE_NETINET_TCP_H 1
323 /* Use libnettle for crypto */
324 /* #undef HAVE_NETTLE */
326 /* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
327 /* #undef HAVE_NETTLE_DSA_COMPAT_H */
329 /* Define to 1 if you have the <nettle/eddsa.h> header file. */
330 /* #undef HAVE_NETTLE_EDDSA_H */
332 /* Use libnss for crypto */
333 /* #undef HAVE_NSS */
335 /* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
336 /* #undef HAVE_OPENSSL_ADD_ALL_DIGESTS */
338 /* Define to 1 if you have the <openssl/bn.h> header file. */
339 #define HAVE_OPENSSL_BN_H 1
341 /* Define to 1 if you have the `OPENSSL_config' function. */
342 #define HAVE_OPENSSL_CONFIG 1
344 /* Define to 1 if you have the <openssl/conf.h> header file. */
345 #define HAVE_OPENSSL_CONF_H 1
347 /* Define to 1 if you have the <openssl/dh.h> header file. */
348 #define HAVE_OPENSSL_DH_H 1
350 /* Define to 1 if you have the <openssl/dsa.h> header file. */
351 #define HAVE_OPENSSL_DSA_H 1
353 /* Define to 1 if you have the <openssl/engine.h> header file. */
354 #define HAVE_OPENSSL_ENGINE_H 1
356 /* Define to 1 if you have the <openssl/err.h> header file. */
357 #define HAVE_OPENSSL_ERR_H 1
359 /* Define to 1 if you have the `OPENSSL_init_crypto' function. */
360 #define HAVE_OPENSSL_INIT_CRYPTO 1
362 /* Define to 1 if you have the `OPENSSL_init_ssl' function. */
363 #define HAVE_OPENSSL_INIT_SSL 1
365 /* Define to 1 if you have the <openssl/rand.h> header file. */
366 #define HAVE_OPENSSL_RAND_H 1
368 /* Define to 1 if you have the <openssl/rsa.h> header file. */
369 #define HAVE_OPENSSL_RSA_H 1
371 /* Define to 1 if you have the <openssl/ssl.h> header file. */
372 #define HAVE_OPENSSL_SSL_H 1
374 /* Define if you have POSIX threads libraries and header files. */
375 #define HAVE_PTHREAD 1
377 /* Have PTHREAD_PRIO_INHERIT. */
378 #define HAVE_PTHREAD_PRIO_INHERIT 1
380 /* Define to 1 if the system has the type `pthread_rwlock_t'. */
381 #define HAVE_PTHREAD_RWLOCK_T 1
383 /* Define to 1 if the system has the type `pthread_spinlock_t'. */
384 #define HAVE_PTHREAD_SPINLOCK_T 1
386 /* Define to 1 if you have the <pwd.h> header file. */
389 /* Define if you have Python libraries and header files. */
390 /* #undef HAVE_PYTHON */
392 /* Define to 1 if you have the `random' function. */
393 #define HAVE_RANDOM 1
395 /* Define to 1 if you have the `RAND_cleanup' function. */
396 /* #undef HAVE_RAND_CLEANUP */
398 /* Define to 1 if you have the `reallocarray' function. */
399 #define HAVE_REALLOCARRAY 1
401 /* Define to 1 if you have the `recvmsg' function. */
402 #define HAVE_RECVMSG 1
404 /* Define to 1 if you have the `sendmsg' function. */
405 #define HAVE_SENDMSG 1
407 /* Define to 1 if you have the `setregid' function. */
408 /* #undef HAVE_SETREGID */
410 /* Define to 1 if you have the `setresgid' function. */
411 #define HAVE_SETRESGID 1
413 /* Define to 1 if you have the `setresuid' function. */
414 #define HAVE_SETRESUID 1
416 /* Define to 1 if you have the `setreuid' function. */
417 /* #undef HAVE_SETREUID */
419 /* Define to 1 if you have the `setrlimit' function. */
420 #define HAVE_SETRLIMIT 1
422 /* Define to 1 if you have the `setsid' function. */
423 #define HAVE_SETSID 1
425 /* Define to 1 if you have the `setusercontext' function. */
426 #define HAVE_SETUSERCONTEXT 1
428 /* Define to 1 if you have the `SHA512_Update' function. */
429 /* #undef HAVE_SHA512_UPDATE */
431 /* Define to 1 if you have the `shmget' function. */
432 #define HAVE_SHMGET 1
434 /* Define to 1 if you have the `sigprocmask' function. */
435 #define HAVE_SIGPROCMASK 1
437 /* Define to 1 if you have the `sleep' function. */
440 /* Define to 1 if you have the `snprintf' function. */
441 #define HAVE_SNPRINTF 1
443 /* Define to 1 if you have the `socketpair' function. */
444 #define HAVE_SOCKETPAIR 1
446 /* Using Solaris threads */
447 /* #undef HAVE_SOLARIS_THREADS */
449 /* Define to 1 if you have the `srandom' function. */
450 #define HAVE_SRANDOM 1
452 /* Define if you have the SSL libraries installed. */
453 #define HAVE_SSL /**/
455 /* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
456 #define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1
458 /* Define to 1 if you have the `SSL_get0_peername' function. */
459 #define HAVE_SSL_GET0_PEERNAME 1
461 /* Define to 1 if you have the `SSL_set1_host' function. */
462 #define HAVE_SSL_SET1_HOST 1
464 /* Define to 1 if you have the <stdarg.h> header file. */
465 #define HAVE_STDARG_H 1
467 /* Define to 1 if you have the <stdbool.h> header file. */
468 #define HAVE_STDBOOL_H 1
470 /* Define to 1 if you have the <stdint.h> header file. */
471 #define HAVE_STDINT_H 1
473 /* Define to 1 if you have the <stdlib.h> header file. */
474 #define HAVE_STDLIB_H 1
476 /* Define to 1 if you have the `strftime' function. */
477 #define HAVE_STRFTIME 1
479 /* Define to 1 if you have the <strings.h> header file. */
480 #define HAVE_STRINGS_H 1
482 /* Define to 1 if you have the <string.h> header file. */
483 #define HAVE_STRING_H 1
485 /* Define to 1 if you have the `strlcat' function. */
486 #define HAVE_STRLCAT 1
488 /* Define to 1 if you have the `strlcpy' function. */
489 #define HAVE_STRLCPY 1
491 /* Define to 1 if you have the `strptime' function. */
492 #define HAVE_STRPTIME 1
494 /* Define to 1 if you have the `strsep' function. */
495 #define HAVE_STRSEP 1
497 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
498 /* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */
500 /* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
501 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
503 /* Define if you have Swig libraries and header files. */
504 /* #undef HAVE_SWIG */
506 /* Define to 1 if you have the <syslog.h> header file. */
507 #define HAVE_SYSLOG_H 1
509 /* Define to 1 if systemd should be used */
510 /* #undef HAVE_SYSTEMD */
512 /* Define to 1 if you have the <sys/endian.h> header file. */
513 #define HAVE_SYS_ENDIAN_H 1
515 /* Define to 1 if you have the <sys/ipc.h> header file. */
516 #define HAVE_SYS_IPC_H 1
518 /* Define to 1 if you have the <sys/param.h> header file. */
519 #define HAVE_SYS_PARAM_H 1
521 /* Define to 1 if you have the <sys/resource.h> header file. */
522 #define HAVE_SYS_RESOURCE_H 1
524 /* Define to 1 if you have the <sys/sha2.h> header file. */
525 /* #undef HAVE_SYS_SHA2_H */
527 /* Define to 1 if you have the <sys/shm.h> header file. */
528 #define HAVE_SYS_SHM_H 1
530 /* Define to 1 if you have the <sys/socket.h> header file. */
531 #define HAVE_SYS_SOCKET_H 1
533 /* Define to 1 if you have the <sys/stat.h> header file. */
534 #define HAVE_SYS_STAT_H 1
536 /* Define to 1 if you have the <sys/sysctl.h> header file. */
537 /* #undef HAVE_SYS_SYSCTL_H */
539 /* Define to 1 if you have the <sys/types.h> header file. */
540 #define HAVE_SYS_TYPES_H 1
542 /* Define to 1 if you have the <sys/uio.h> header file. */
543 #define HAVE_SYS_UIO_H 1
545 /* Define to 1 if you have the <sys/un.h> header file. */
546 #define HAVE_SYS_UN_H 1
548 /* Define to 1 if you have the <sys/wait.h> header file. */
549 #define HAVE_SYS_WAIT_H 1
551 /* Define to 1 if you have the <time.h> header file. */
552 #define HAVE_TIME_H 1
554 /* Define to 1 if you have the `tzset' function. */
557 /* Define to 1 if you have the <unistd.h> header file. */
558 #define HAVE_UNISTD_H 1
560 /* Define to 1 if you have the `usleep' function. */
561 #define HAVE_USLEEP 1
563 /* Define to 1 if you have the `vfork' function. */
566 /* Define to 1 if you have the <vfork.h> header file. */
567 /* #undef HAVE_VFORK_H */
569 /* Define to 1 if you have the <windows.h> header file. */
570 /* #undef HAVE_WINDOWS_H */
572 /* Using Windows threads */
573 /* #undef HAVE_WINDOWS_THREADS */
575 /* Define to 1 if you have the <winsock2.h> header file. */
576 /* #undef HAVE_WINSOCK2_H */
578 /* Define to 1 if `fork' works. */
579 #define HAVE_WORKING_FORK 1
581 /* Define to 1 if `vfork' works. */
582 #define HAVE_WORKING_VFORK 1
584 /* Define to 1 if you have the `writev' function. */
585 #define HAVE_WRITEV 1
587 /* Define to 1 if you have the <ws2tcpip.h> header file. */
588 /* #undef HAVE_WS2TCPIP_H */
590 /* Define to 1 if you have the `_beginthreadex' function. */
591 /* #undef HAVE__BEGINTHREADEX */
593 /* if lex has yylex_destroy */
594 #define LEX_HAS_YYLEX_DESTROY 1
596 /* Define to the sub-directory where libtool stores uninstalled libraries. */
597 #define LT_OBJDIR ".libs/"
599 /* Define to the maximum message length to pass to syslog. */
600 #define MAXSYSLOGMSGLEN 10240
602 /* Define if memcmp() does not compare unsigned bytes */
603 /* #undef MEMCMP_IS_BROKEN */
605 /* Define if mkdir has one argument. */
606 /* #undef MKDIR_HAS_ONE_ARG */
608 /* Define if the network stack does not fully support nonblocking io (causes
609 lower performance). */
610 /* #undef NONBLOCKING_IS_BROKEN */
612 /* Put -D_ALL_SOURCE define in config.h */
613 /* #undef OMITTED__D_ALL_SOURCE */
615 /* Put -D_BSD_SOURCE define in config.h */
616 /* #undef OMITTED__D_BSD_SOURCE */
618 /* Put -D_DEFAULT_SOURCE define in config.h */
619 /* #undef OMITTED__D_DEFAULT_SOURCE */
621 /* Put -D_GNU_SOURCE define in config.h */
622 /* #undef OMITTED__D_GNU_SOURCE */
624 /* Put -D_LARGEFILE_SOURCE=1 define in config.h */
625 /* #undef OMITTED__D_LARGEFILE_SOURCE_1 */
627 /* Put -D_POSIX_C_SOURCE=200112 define in config.h */
628 /* #undef OMITTED__D_POSIX_C_SOURCE_200112 */
630 /* Put -D_XOPEN_SOURCE=600 define in config.h */
631 /* #undef OMITTED__D_XOPEN_SOURCE_600 */
633 /* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
634 /* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */
636 /* Put -D__EXTENSIONS__ define in config.h */
637 /* #undef OMITTED__D__EXTENSIONS__ */
639 /* Define to the address where bug reports for this package should be sent. */
640 #define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl"
642 /* Define to the full name of this package. */
643 #define PACKAGE_NAME "unbound"
645 /* Define to the full name and version of this package. */
646 #define PACKAGE_STRING "unbound 1.8.1"
648 /* Define to the one symbol short name of this package. */
649 #define PACKAGE_TARNAME "unbound"
651 /* Define to the home page for this package. */
652 #define PACKAGE_URL ""
654 /* Define to the version of this package. */
655 #define PACKAGE_VERSION "1.8.1"
657 /* default pidfile location */
658 #define PIDFILE "/var/unbound/unbound.pid"
660 /* Define to necessary symbol if this constant uses a non-standard name on
662 /* #undef PTHREAD_CREATE_JOINABLE */
664 /* Define as the return type of signal handlers (`int' or `void'). */
665 #define RETSIGTYPE void
667 /* default rootkey location */
668 #define ROOT_ANCHOR_FILE "/var/unbound/root.key"
670 /* default rootcert location */
671 #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
673 /* version number for resource files */
674 #define RSRC_PACKAGE_VERSION 1,8,1,0
676 /* Directory to chdir to */
677 #define RUN_DIR "/var/unbound"
680 #define SHARE_DIR "/var/unbound"
682 /* The size of `time_t', as computed by sizeof. */
683 #define SIZEOF_TIME_T 8
685 /* define if (v)snprintf does not return length needed, (but length used) */
686 /* #undef SNPRINTF_RET_BROKEN */
688 /* Define to 1 if libsodium supports sodium_set_misuse_handler */
689 /* #undef SODIUM_MISUSE_HANDLER */
691 /* Define to 1 if you have the ANSI C header files. */
692 #define STDC_HEADERS 1
694 /* use default strptime. */
695 #define STRPTIME_WORKS 1
697 /* Use win32 resources and API */
698 /* #undef UB_ON_WINDOWS */
700 /* default username */
701 #define UB_USERNAME "unbound"
703 /* use to enable lightweight alloc assertions, for debug use */
704 /* #undef UNBOUND_ALLOC_LITE */
706 /* use malloc not regions, for debug use */
707 /* #undef UNBOUND_ALLOC_NONREGIONAL */
709 /* use statistics for allocs and frees, for debug use */
710 /* #undef UNBOUND_ALLOC_STATS */
712 /* define this to enable debug checks. */
713 /* #undef UNBOUND_DEBUG */
715 /* Define to 1 to use cachedb support */
716 /* #undef USE_CACHEDB */
718 /* Define to 1 to enable dnscrypt support */
719 /* #undef USE_DNSCRYPT */
721 /* Define to 1 to enable dnscrypt with xchacha20 support */
722 /* #undef USE_DNSCRYPT_XCHACHA20 */
724 /* Define to 1 to enable dnstap support */
725 /* #undef USE_DNSTAP */
727 /* Define this to enable DSA support. */
730 /* Define this to enable ECDSA support. */
733 /* Define this to enable an EVP workaround for older openssl */
734 /* #undef USE_ECDSA_EVP_WORKAROUND */
736 /* Define this to enable ED25519 support. */
737 #define USE_ED25519 1
739 /* Define this to enable ED448 support. */
742 /* Define this to enable GOST support. */
743 /* #undef USE_GOST */
745 /* Define to 1 to use ipsecmod support. */
746 /* #undef USE_IPSECMOD */
748 /* Define if you want to use internal select based events */
749 #define USE_MINI_EVENT 1
751 /* Define this to enable client TCP Fast Open. */
752 /* #undef USE_MSG_FASTOPEN */
754 /* Define this to enable client TCP Fast Open. */
755 /* #undef USE_OSX_MSG_FASTOPEN */
757 /* Define this to use hiredis client. */
758 /* #undef USE_REDIS */
760 /* Define this to enable SHA1 support. */
763 /* Define this to enable SHA256 and SHA512 support. */
766 /* Enable extensions on AIX 3, Interix. */
768 # define _ALL_SOURCE 1
770 /* Enable GNU extensions on systems that have them. */
772 # define _GNU_SOURCE 1
774 /* Enable threading extensions on Solaris. */
775 #ifndef _POSIX_PTHREAD_SEMANTICS
776 # define _POSIX_PTHREAD_SEMANTICS 1
778 /* Enable extensions on HP NonStop. */
779 #ifndef _TANDEM_SOURCE
780 # define _TANDEM_SOURCE 1
782 /* Enable general extensions on Solaris. */
783 #ifndef __EXTENSIONS__
784 # define __EXTENSIONS__ 1
788 /* Define this to enable server TCP Fast Open. */
789 /* #undef USE_TCP_FASTOPEN */
791 /* Whether the windows socket API is used */
792 /* #undef USE_WINSOCK */
794 /* the version of the windows API enabled */
795 #define WINVER 0x0502
797 /* Define if you want Python module. */
798 /* #undef WITH_PYTHONMODULE */
800 /* Define if you want PyUnbound. */
801 /* #undef WITH_PYUNBOUND */
803 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
805 #define YYTEXT_POINTER 1
807 /* Enable large inode numbers on Mac OS X 10.5. */
808 #ifndef _DARWIN_USE_64_BIT_INODE
809 # define _DARWIN_USE_64_BIT_INODE 1
812 /* Number of bits in a file offset, on hosts where this is settable. */
813 /* #undef _FILE_OFFSET_BITS */
815 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
816 /* #undef _LARGEFILE_SOURCE */
818 /* Define for large files, on AIX-style hosts. */
819 /* #undef _LARGE_FILES */
821 /* Define to 1 if on MINIX. */
824 /* Enable for compile on Minix */
825 /* #undef _NETBSD_SOURCE */
827 /* Define to 2 if the system does not provide POSIX.1 features except with
829 /* #undef _POSIX_1_SOURCE */
831 /* Define to 1 if you need to in order for `stat' and other things to work. */
832 /* #undef _POSIX_SOURCE */
834 /* Define to empty if `const' does not conform to ANSI C. */
837 /* Define to `int' if <sys/types.h> doesn't define. */
841 /* #undef in_addr_t */
844 /* #undef in_port_t */
846 /* Define to `__inline__' or `__inline' if that's what the C compiler
847 calls it, or to nothing if 'inline' is not supported under any name. */
852 /* Define to `short' if <sys/types.h> does not define. */
855 /* Define to `int' if <sys/types.h> does not define. */
858 /* Define to `long long' if <sys/types.h> does not define. */
861 /* Define to `signed char' if <sys/types.h> does not define. */
864 /* Define if replacement function should be used. */
867 /* Define to `long int' if <sys/types.h> does not define. */
870 /* Define to `int' if <sys/types.h> does not define. */
873 /* Define to 'int' if not defined */
876 /* Define to `unsigned int' if <sys/types.h> does not define. */
879 /* Define to 'int' if not defined */
880 /* #undef socklen_t */
882 /* Define to `int' if <sys/types.h> does not define. */
885 /* Define to 'unsigned char if not defined */
888 /* Define to `int' if <sys/types.h> doesn't define. */
891 /* Define to `unsigned short' if <sys/types.h> does not define. */
892 /* #undef uint16_t */
894 /* Define to `unsigned int' if <sys/types.h> does not define. */
895 /* #undef uint32_t */
897 /* Define to `unsigned long long' if <sys/types.h> does not define. */
898 /* #undef uint64_t */
900 /* Define to `unsigned char' if <sys/types.h> does not define. */
903 /* Define as `fork' if `vfork' does not work. */
906 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
907 #define _GNU_SOURCE 1
910 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
911 #define _BSD_SOURCE 1
914 #if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
915 #define _DEFAULT_SOURCE 1
918 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
919 #define __EXTENSIONS__ 1
922 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
923 #define _POSIX_C_SOURCE 200112
926 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
927 #define _XOPEN_SOURCE 600
930 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
931 #define _XOPEN_SOURCE_EXTENDED 1
934 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
935 #define _ALL_SOURCE 1
938 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
939 #define _LARGEFILE_SOURCE 1
945 #ifndef UNBOUND_DEBUG
949 /** Use small-ldns codebase */
952 # define LDNS_BUILD_CONFIG_HAVE_SSL 1
976 #include <sys/param.h>
979 #ifdef HAVE_SYS_SOCKET_H
980 #include <sys/socket.h>
983 #ifdef HAVE_SYS_UIO_H
987 #ifdef HAVE_NETINET_IN_H
988 #include <netinet/in.h>
991 #ifdef HAVE_NETINET_TCP_H
992 #include <netinet/tcp.h>
995 #ifdef HAVE_ARPA_INET_H
996 #include <arpa/inet.h>
999 #ifdef HAVE_WINSOCK2_H
1000 #include <winsock2.h>
1003 #ifdef HAVE_WS2TCPIP_H
1004 #include <ws2tcpip.h>
1008 #define ARG_LL "%ll"
1010 #define ARG_LL "%I64"
1014 #define AF_LOCAL AF_UNIX
1019 #ifdef HAVE_ATTR_FORMAT
1020 # define ATTR_FORMAT(archetype, string_index, first_to_check) \
1021 __attribute__ ((format (archetype, string_index, first_to_check)))
1022 #else /* !HAVE_ATTR_FORMAT */
1023 # define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
1024 #endif /* !HAVE_ATTR_FORMAT */
1027 #if defined(DOXYGEN)
1028 # define ATTR_UNUSED(x) x
1029 #elif defined(__cplusplus)
1030 # define ATTR_UNUSED(x)
1031 #elif defined(HAVE_ATTR_UNUSED)
1032 # define ATTR_UNUSED(x) x __attribute__((unused))
1033 #else /* !HAVE_ATTR_UNUSED */
1034 # define ATTR_UNUSED(x) x
1035 #endif /* !HAVE_ATTR_UNUSED */
1039 #define fseeko fseek
1040 #define ftello ftell
1041 #endif /* HAVE_FSEEKO */
1044 #ifndef MAXHOSTNAMELEN
1045 #define MAXHOSTNAMELEN 256
1048 #if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
1049 #define snprintf snprintf_unbound
1050 #define vsnprintf vsnprintf_unbound
1052 int snprintf (char *str, size_t count, const char *fmt, ...);
1053 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
1054 #endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
1056 #ifndef HAVE_INET_PTON
1057 #define inet_pton inet_pton_unbound
1058 int inet_pton(int af, const char* src, void* dst);
1059 #endif /* HAVE_INET_PTON */
1062 #ifndef HAVE_INET_NTOP
1063 #define inet_ntop inet_ntop_unbound
1064 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1068 #ifndef HAVE_INET_ATON
1069 #define inet_aton inet_aton_unbound
1070 int inet_aton(const char *cp, struct in_addr *addr);
1074 #ifndef HAVE_MEMMOVE
1075 #define memmove memmove_unbound
1076 void *memmove(void *dest, const void *src, size_t n);
1080 #ifndef HAVE_STRLCAT
1081 #define strlcat strlcat_unbound
1082 size_t strlcat(char *dst, const char *src, size_t siz);
1086 #ifndef HAVE_STRLCPY
1087 #define strlcpy strlcpy_unbound
1088 size_t strlcpy(char *dst, const char *src, size_t siz);
1092 #ifndef HAVE_GMTIME_R
1093 #define gmtime_r gmtime_r_unbound
1094 struct tm *gmtime_r(const time_t *timep, struct tm *result);
1098 #ifndef HAVE_REALLOCARRAY
1099 #define reallocarray reallocarrayunbound
1100 void* reallocarray(void *ptr, size_t nmemb, size_t size);
1104 #if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1105 #define sleep(x) Sleep((x)*1000) /* on win32 */
1106 #endif /* HAVE_SLEEP */
1110 #define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1111 #endif /* HAVE_USLEEP */
1115 #define random rand /* on win32, for tests only (bad random) */
1116 #endif /* HAVE_RANDOM */
1119 #ifndef HAVE_SRANDOM
1120 #define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1121 #endif /* HAVE_SRANDOM */
1124 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1125 #ifdef HAVE_WINSOCK2_H
1126 #define FD_SET_T (u_int)
1132 #ifndef IPV6_MIN_MTU
1133 #define IPV6_MIN_MTU 1280
1134 #endif /* IPV6_MIN_MTU */
1137 #ifdef MEMCMP_IS_BROKEN
1138 #include "compat/memcmp.h"
1139 #define memcmp memcmp_unbound
1140 int memcmp(const void *x, const void *y, size_t n);
1145 #ifndef HAVE_CTIME_R
1146 #define ctime_r unbound_ctime_r
1147 char *ctime_r(const time_t *timep, char *buf);
1151 #define strsep unbound_strsep
1152 char *strsep(char **stringp, const char *delim);
1155 #ifndef HAVE_ISBLANK
1156 #define isblank unbound_isblank
1160 #ifndef HAVE_EXPLICIT_BZERO
1161 #define explicit_bzero unbound_explicit_bzero
1162 void explicit_bzero(void* buf, size_t len);
1165 #if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
1166 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1169 #if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
1170 int inet_pton(int af, const char* src, void* dst);
1173 #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1174 #define strptime unbound_strptime
1176 char *strptime(const char *s, const char *format, struct tm *tm);
1179 #ifdef HAVE_LIBRESSL
1180 # if !HAVE_DECL_STRLCPY
1181 size_t strlcpy(char *dst, const char *src, size_t siz);
1183 # if !HAVE_DECL_STRLCAT
1184 size_t strlcat(char *dst, const char *src, size_t siz);
1186 # if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1187 uint32_t arc4random(void);
1189 # if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1190 uint32_t arc4random_uniform(uint32_t upper_bound);
1192 # if !HAVE_DECL_REALLOCARRAY
1193 void *reallocarray(void *ptr, size_t nmemb, size_t size);
1195 #endif /* HAVE_LIBRESSL */
1196 #ifndef HAVE_ARC4RANDOM
1197 int getentropy(void* buf, size_t len);
1198 uint32_t arc4random(void);
1199 void arc4random_buf(void* buf, size_t n);
1200 void _ARC4_LOCK(void);
1201 void _ARC4_UNLOCK(void);
1202 void _ARC4_LOCK_DESTROY(void);
1204 #ifndef HAVE_ARC4RANDOM_UNIFORM
1205 uint32_t arc4random_uniform(uint32_t upper_bound);
1207 #ifdef COMPAT_SHA512
1208 #ifndef SHA512_DIGEST_LENGTH
1209 #define SHA512_BLOCK_LENGTH 128
1210 #define SHA512_DIGEST_LENGTH 64
1211 #define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
1212 typedef struct _SHA512_CTX {
1214 uint64_t bitcount[2];
1215 uint8_t buffer[SHA512_BLOCK_LENGTH];
1217 #endif /* SHA512_DIGEST_LENGTH */
1218 void SHA512_Init(SHA512_CTX*);
1219 void SHA512_Update(SHA512_CTX*, void*, size_t);
1220 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1221 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1222 #endif /* COMPAT_SHA512 */
1226 #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))
1227 /* using version of libevent that is not threadsafe. */
1228 # define LIBEVENT_SIGNAL_PROBLEM 1
1231 #ifndef CHECKED_INET6
1232 # define CHECKED_INET6
1236 # define AF_INET6 28
1238 #endif /* CHECKED_INET6 */
1240 #ifndef HAVE_GETADDRINFO
1241 struct sockaddr_storage;
1242 #include "compat/fake-rfc2553.h"
1245 #ifdef UNBOUND_ALLOC_STATS
1246 # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1247 # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1248 # define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1249 # define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1250 void *unbound_stat_malloc(size_t size);
1251 void *unbound_stat_calloc(size_t nmemb, size_t size);
1252 void unbound_stat_free(void *ptr);
1253 void *unbound_stat_realloc(void *ptr, size_t size);
1254 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1256 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1257 int line, const char* func);
1258 void unbound_stat_free_log(void *ptr, const char* file, int line,
1260 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1261 int line, const char* func);
1262 #elif defined(UNBOUND_ALLOC_LITE)
1263 # include "util/alloc.h"
1264 #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1266 /** default port for DNS traffic. */
1267 #define UNBOUND_DNS_PORT 53
1268 /** default port for DNS over TLS traffic. */
1269 #define UNBOUND_DNS_OVER_TLS_PORT 853
1270 /** default port for unbound control traffic, registered port with IANA,
1271 ub-dns-control 8953/tcp unbound dns nameserver control */
1272 #define UNBOUND_CONTROL_PORT 8953
1273 /** the version of unbound-control that this software implements */
1274 #define UNBOUND_CONTROL_VERSION 1