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 `NID_secp384r1', and to 0 if you
74 #define HAVE_DECL_NID_SECP384R1 1
76 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
78 #define HAVE_DECL_NID_X9_62_PRIME256V1 1
80 /* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
82 /* #undef HAVE_DECL_REALLOCARRAY */
84 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
86 #define HAVE_DECL_SK_SSL_COMP_POP_FREE 1
88 /* Define to 1 if you have the declaration of
89 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
90 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1
92 /* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
94 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 1
96 /* Define to 1 if you have the declaration of `strlcat', and to 0 if you
98 /* #undef HAVE_DECL_STRLCAT */
100 /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
102 /* #undef HAVE_DECL_STRLCPY */
104 /* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
106 #define HAVE_DECL_XML_STOPPARSER 1
108 /* Define to 1 if you have the <dlfcn.h> header file. */
109 #define HAVE_DLFCN_H 1
111 /* Define to 1 if you have the <endian.h> header file. */
112 /* #undef HAVE_ENDIAN_H */
114 /* Define to 1 if you have the `endprotoent' function. */
115 #define HAVE_ENDPROTOENT 1
117 /* Define to 1 if you have the `endpwent' function. */
118 #define HAVE_ENDPWENT 1
120 /* Define to 1 if you have the `endservent' function. */
121 #define HAVE_ENDSERVENT 1
123 /* Define to 1 if you have the `ERR_free_strings' function. */
124 #define HAVE_ERR_FREE_STRINGS 1
126 /* Define to 1 if you have the `ERR_load_crypto_strings' function. */
127 #define HAVE_ERR_LOAD_CRYPTO_STRINGS 1
129 /* Define to 1 if you have the `event_base_free' function. */
130 /* #undef HAVE_EVENT_BASE_FREE */
132 /* Define to 1 if you have the `event_base_get_method' function. */
133 /* #undef HAVE_EVENT_BASE_GET_METHOD */
135 /* Define to 1 if you have the `event_base_new' function. */
136 /* #undef HAVE_EVENT_BASE_NEW */
138 /* Define to 1 if you have the `event_base_once' function. */
139 /* #undef HAVE_EVENT_BASE_ONCE */
141 /* Define to 1 if you have the <event.h> header file. */
142 /* #undef HAVE_EVENT_H */
144 /* Define to 1 if you have the `EVP_cleanup' function. */
145 #define HAVE_EVP_CLEANUP 1
147 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
148 /* #undef HAVE_EVP_MD_CTX_NEW */
150 /* Define to 1 if you have the `EVP_sha1' function. */
151 #define HAVE_EVP_SHA1 1
153 /* Define to 1 if you have the `EVP_sha256' function. */
154 #define HAVE_EVP_SHA256 1
156 /* Define to 1 if you have the `EVP_sha512' function. */
157 #define HAVE_EVP_SHA512 1
159 /* Define to 1 if you have the `ev_default_loop' function. */
160 /* #undef HAVE_EV_DEFAULT_LOOP */
162 /* Define to 1 if you have the `ev_loop' function. */
163 /* #undef HAVE_EV_LOOP */
165 /* Define to 1 if you have the <expat.h> header file. */
166 #define HAVE_EXPAT_H 1
168 /* Define to 1 if you have the `fcntl' function. */
171 /* Define to 1 if you have the `FIPS_mode' function. */
172 #define HAVE_FIPS_MODE 1
174 /* Define to 1 if you have the `fork' function. */
177 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
178 #define HAVE_FSEEKO 1
180 /* Define to 1 if you have the `fsync' function. */
183 /* Whether getaddrinfo is available */
184 #define HAVE_GETADDRINFO 1
186 /* Define to 1 if you have the `getauxval' function. */
187 /* #undef HAVE_GETAUXVAL */
189 /* Define to 1 if you have the `getentropy' function. */
190 /* #undef HAVE_GETENTROPY */
192 /* Define to 1 if you have the <getopt.h> header file. */
193 #define HAVE_GETOPT_H 1
195 /* Define to 1 if you have the `getpwnam' function. */
196 #define HAVE_GETPWNAM 1
198 /* Define to 1 if you have the `getrlimit' function. */
199 #define HAVE_GETRLIMIT 1
201 /* Define to 1 if you have the `glob' function. */
204 /* Define to 1 if you have the <glob.h> header file. */
205 #define HAVE_GLOB_H 1
207 /* Define to 1 if you have the `gmtime_r' function. */
208 #define HAVE_GMTIME_R 1
210 /* Define to 1 if you have the <grp.h> header file. */
213 /* If you have HMAC_Update */
214 #define HAVE_HMAC_UPDATE 1
216 /* Define to 1 if you have the `inet_aton' function. */
217 #define HAVE_INET_ATON 1
219 /* Define to 1 if you have the `inet_ntop' function. */
220 #define HAVE_INET_NTOP 1
222 /* Define to 1 if you have the `inet_pton' function. */
223 #define HAVE_INET_PTON 1
225 /* Define to 1 if you have the `initgroups' function. */
226 #define HAVE_INITGROUPS 1
228 /* Define to 1 if you have the <inttypes.h> header file. */
229 #define HAVE_INTTYPES_H 1
231 /* if the function 'ioctlsocket' is available */
232 /* #undef HAVE_IOCTLSOCKET */
234 /* Define to 1 if you have the <iphlpapi.h> header file. */
235 /* #undef HAVE_IPHLPAPI_H */
237 /* Define to 1 if you have the `isblank' function. */
238 #define HAVE_ISBLANK 1
240 /* Define to 1 if you have the `kill' function. */
243 /* Define if we have LibreSSL */
244 /* #undef HAVE_LIBRESSL */
246 /* Define to 1 if you have the `localtime_r' function. */
247 #define HAVE_LOCALTIME_R 1
249 /* Define to 1 if you have the <login_cap.h> header file. */
250 #define HAVE_LOGIN_CAP_H 1
252 /* If have GNU libc compatible malloc */
253 #define HAVE_MALLOC 1
255 /* Define to 1 if you have the `memmove' function. */
256 #define HAVE_MEMMOVE 1
258 /* Define to 1 if you have the <memory.h> header file. */
259 #define HAVE_MEMORY_H 1
261 /* Define to 1 if you have the <netdb.h> header file. */
262 #define HAVE_NETDB_H 1
264 /* Define to 1 if you have the <netinet/in.h> header file. */
265 #define HAVE_NETINET_IN_H 1
267 /* Define to 1 if you have the <netinet/tcp.h> header file. */
268 #define HAVE_NETINET_TCP_H 1
270 /* Use libnettle for crypto */
271 /* #undef HAVE_NETTLE */
273 /* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
274 /* #undef HAVE_NETTLE_DSA_COMPAT_H */
276 /* Use libnss for crypto */
277 /* #undef HAVE_NSS */
279 /* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
280 #define HAVE_OPENSSL_ADD_ALL_DIGESTS 1
282 /* Define to 1 if you have the <openssl/bn.h> header file. */
283 #define HAVE_OPENSSL_BN_H 1
285 /* Define to 1 if you have the `OPENSSL_config' function. */
286 #define HAVE_OPENSSL_CONFIG 1
288 /* Define to 1 if you have the <openssl/conf.h> header file. */
289 #define HAVE_OPENSSL_CONF_H 1
291 /* Define to 1 if you have the <openssl/dh.h> header file. */
292 #define HAVE_OPENSSL_DH_H 1
294 /* Define to 1 if you have the <openssl/dsa.h> header file. */
295 #define HAVE_OPENSSL_DSA_H 1
297 /* Define to 1 if you have the <openssl/engine.h> header file. */
298 #define HAVE_OPENSSL_ENGINE_H 1
300 /* Define to 1 if you have the <openssl/err.h> header file. */
301 #define HAVE_OPENSSL_ERR_H 1
303 /* Define to 1 if you have the `OPENSSL_init_crypto' function. */
304 /* #undef HAVE_OPENSSL_INIT_CRYPTO */
306 /* Define to 1 if you have the `OPENSSL_init_ssl' function. */
307 /* #undef HAVE_OPENSSL_INIT_SSL */
309 /* Define to 1 if you have the <openssl/rand.h> header file. */
310 #define HAVE_OPENSSL_RAND_H 1
312 /* Define to 1 if you have the <openssl/rsa.h> header file. */
313 #define HAVE_OPENSSL_RSA_H 1
315 /* Define to 1 if you have the <openssl/ssl.h> header file. */
316 #define HAVE_OPENSSL_SSL_H 1
318 /* Define if you have POSIX threads libraries and header files. */
319 #define HAVE_PTHREAD 1
321 /* Have PTHREAD_PRIO_INHERIT. */
322 #define HAVE_PTHREAD_PRIO_INHERIT 1
324 /* Define to 1 if the system has the type `pthread_rwlock_t'. */
325 #define HAVE_PTHREAD_RWLOCK_T 1
327 /* Define to 1 if the system has the type `pthread_spinlock_t'. */
328 #define HAVE_PTHREAD_SPINLOCK_T 1
330 /* Define to 1 if you have the <pwd.h> header file. */
333 /* Define if you have Python libraries and header files. */
334 /* #undef HAVE_PYTHON */
336 /* Define to 1 if you have the `random' function. */
337 #define HAVE_RANDOM 1
339 /* Define to 1 if you have the `RAND_cleanup' function. */
340 #define HAVE_RAND_CLEANUP 1
342 /* Define to 1 if you have the `reallocarray' function. */
343 #define HAVE_REALLOCARRAY 1
345 /* Define to 1 if you have the `recvmsg' function. */
346 #define HAVE_RECVMSG 1
348 /* define if you have the sbrk() call */
349 /* #undef HAVE_SBRK */
351 /* Define to 1 if you have the `sendmsg' function. */
352 #define HAVE_SENDMSG 1
354 /* Define to 1 if you have the `setregid' function. */
355 /* #undef HAVE_SETREGID */
357 /* Define to 1 if you have the `setresgid' function. */
358 #define HAVE_SETRESGID 1
360 /* Define to 1 if you have the `setresuid' function. */
361 #define HAVE_SETRESUID 1
363 /* Define to 1 if you have the `setreuid' function. */
364 /* #undef HAVE_SETREUID */
366 /* Define to 1 if you have the `setrlimit' function. */
367 #define HAVE_SETRLIMIT 1
369 /* Define to 1 if you have the `setsid' function. */
370 #define HAVE_SETSID 1
372 /* Define to 1 if you have the `setusercontext' function. */
373 #define HAVE_SETUSERCONTEXT 1
375 /* Define to 1 if you have the `SHA512_Update' function. */
376 /* #undef HAVE_SHA512_UPDATE */
378 /* Define to 1 if you have the `sigprocmask' function. */
379 #define HAVE_SIGPROCMASK 1
381 /* Define to 1 if you have the `sleep' function. */
384 /* Define to 1 if you have the `snprintf' function. */
385 #define HAVE_SNPRINTF 1
387 /* Define to 1 if you have the `socketpair' function. */
388 #define HAVE_SOCKETPAIR 1
390 /* Using Solaris threads */
391 /* #undef HAVE_SOLARIS_THREADS */
393 /* Define to 1 if you have the `srandom' function. */
394 #define HAVE_SRANDOM 1
396 /* Define if you have the SSL libraries installed. */
397 #define HAVE_SSL /**/
399 /* Define to 1 if you have the <stdarg.h> header file. */
400 #define HAVE_STDARG_H 1
402 /* Define to 1 if you have the <stdbool.h> header file. */
403 #define HAVE_STDBOOL_H 1
405 /* Define to 1 if you have the <stdint.h> header file. */
406 #define HAVE_STDINT_H 1
408 /* Define to 1 if you have the <stdlib.h> header file. */
409 #define HAVE_STDLIB_H 1
411 /* Define to 1 if you have the `strftime' function. */
412 #define HAVE_STRFTIME 1
414 /* Define to 1 if you have the <strings.h> header file. */
415 #define HAVE_STRINGS_H 1
417 /* Define to 1 if you have the <string.h> header file. */
418 #define HAVE_STRING_H 1
420 /* Define to 1 if you have the `strlcat' function. */
421 #define HAVE_STRLCAT 1
423 /* Define to 1 if you have the `strlcpy' function. */
424 #define HAVE_STRLCPY 1
426 /* Define to 1 if you have the `strptime' function. */
427 #define HAVE_STRPTIME 1
429 /* Define to 1 if you have the `strsep' function. */
430 #define HAVE_STRSEP 1
432 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
433 /* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */
435 /* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
436 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
438 /* Define if you have Swig libraries and header files. */
439 /* #undef HAVE_SWIG */
441 /* Define to 1 if you have the <syslog.h> header file. */
442 #define HAVE_SYSLOG_H 1
444 /* Define to 1 if you have the <sys/param.h> header file. */
445 #define HAVE_SYS_PARAM_H 1
447 /* Define to 1 if you have the <sys/resource.h> header file. */
448 #define HAVE_SYS_RESOURCE_H 1
450 /* Define to 1 if you have the <sys/sha2.h> header file. */
451 /* #undef HAVE_SYS_SHA2_H */
453 /* Define to 1 if you have the <sys/socket.h> header file. */
454 #define HAVE_SYS_SOCKET_H 1
456 /* Define to 1 if you have the <sys/stat.h> header file. */
457 #define HAVE_SYS_STAT_H 1
459 /* Define to 1 if you have the <sys/sysctl.h> header file. */
460 /* #undef HAVE_SYS_SYSCTL_H */
462 /* Define to 1 if you have the <sys/types.h> header file. */
463 #define HAVE_SYS_TYPES_H 1
465 /* Define to 1 if you have the <sys/uio.h> header file. */
466 #define HAVE_SYS_UIO_H 1
468 /* Define to 1 if you have the <sys/un.h> header file. */
469 #define HAVE_SYS_UN_H 1
471 /* Define to 1 if you have the <sys/wait.h> header file. */
472 #define HAVE_SYS_WAIT_H 1
474 /* Define to 1 if you have the <time.h> header file. */
475 #define HAVE_TIME_H 1
477 /* Define to 1 if you have the `tzset' function. */
480 /* Define to 1 if you have the <unistd.h> header file. */
481 #define HAVE_UNISTD_H 1
483 /* Define to 1 if you have the `usleep' function. */
484 #define HAVE_USLEEP 1
486 /* Define to 1 if you have the `vfork' function. */
489 /* Define to 1 if you have the <vfork.h> header file. */
490 /* #undef HAVE_VFORK_H */
492 /* Define to 1 if you have the <windows.h> header file. */
493 /* #undef HAVE_WINDOWS_H */
495 /* Using Windows threads */
496 /* #undef HAVE_WINDOWS_THREADS */
498 /* Define to 1 if you have the <winsock2.h> header file. */
499 /* #undef HAVE_WINSOCK2_H */
501 /* Define to 1 if `fork' works. */
502 #define HAVE_WORKING_FORK 1
504 /* Define to 1 if `vfork' works. */
505 #define HAVE_WORKING_VFORK 1
507 /* Define to 1 if you have the `writev' function. */
508 #define HAVE_WRITEV 1
510 /* Define to 1 if you have the <ws2tcpip.h> header file. */
511 /* #undef HAVE_WS2TCPIP_H */
513 /* Define to 1 if you have the `_beginthreadex' function. */
514 /* #undef HAVE__BEGINTHREADEX */
516 /* if lex has yylex_destroy */
517 #define LEX_HAS_YYLEX_DESTROY 1
519 /* Define to the sub-directory where libtool stores uninstalled libraries. */
520 #define LT_OBJDIR ".libs/"
522 /* Define to the maximum message length to pass to syslog. */
523 #define MAXSYSLOGMSGLEN 10240
525 /* Define if memcmp() does not compare unsigned bytes */
526 /* #undef MEMCMP_IS_BROKEN */
528 /* Define if mkdir has one argument. */
529 /* #undef MKDIR_HAS_ONE_ARG */
531 /* Define if the network stack does not fully support nonblocking io (causes
532 lower performance). */
533 /* #undef NONBLOCKING_IS_BROKEN */
535 /* Put -D_ALL_SOURCE define in config.h */
536 /* #undef OMITTED__D_ALL_SOURCE */
538 /* Put -D_BSD_SOURCE define in config.h */
539 /* #undef OMITTED__D_BSD_SOURCE */
541 /* Put -D_DEFAULT_SOURCE define in config.h */
542 /* #undef OMITTED__D_DEFAULT_SOURCE */
544 /* Put -D_GNU_SOURCE define in config.h */
545 /* #undef OMITTED__D_GNU_SOURCE */
547 /* Put -D_LARGEFILE_SOURCE=1 define in config.h */
548 /* #undef OMITTED__D_LARGEFILE_SOURCE_1 */
550 /* Put -D_POSIX_C_SOURCE=200112 define in config.h */
551 /* #undef OMITTED__D_POSIX_C_SOURCE_200112 */
553 /* Put -D_XOPEN_SOURCE=600 define in config.h */
554 /* #undef OMITTED__D_XOPEN_SOURCE_600 */
556 /* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
557 /* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */
559 /* Put -D__EXTENSIONS__ define in config.h */
560 /* #undef OMITTED__D__EXTENSIONS__ */
562 /* Define to the address where bug reports for this package should be sent. */
563 #define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl"
565 /* Define to the full name of this package. */
566 #define PACKAGE_NAME "unbound"
568 /* Define to the full name and version of this package. */
569 #define PACKAGE_STRING "unbound 1.5.10"
571 /* Define to the one symbol short name of this package. */
572 #define PACKAGE_TARNAME "unbound"
574 /* Define to the home page for this package. */
575 #define PACKAGE_URL ""
577 /* Define to the version of this package. */
578 #define PACKAGE_VERSION "1.5.10"
580 /* default pidfile location */
581 #define PIDFILE "/var/unbound/unbound.pid"
583 /* Define to necessary symbol if this constant uses a non-standard name on
585 /* #undef PTHREAD_CREATE_JOINABLE */
587 /* Define as the return type of signal handlers (`int' or `void'). */
588 #define RETSIGTYPE void
590 /* default rootkey location */
591 #define ROOT_ANCHOR_FILE "/var/unbound/root.key"
593 /* default rootcert location */
594 #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
596 /* version number for resource files */
597 #define RSRC_PACKAGE_VERSION 1,5,10,0
599 /* Directory to chdir to */
600 #define RUN_DIR "/var/unbound"
603 #define SHARE_DIR "/var/unbound"
605 /* The size of `time_t', as computed by sizeof. */
606 #define SIZEOF_TIME_T 8
608 /* define if (v)snprintf does not return length needed, (but length used) */
609 /* #undef SNPRINTF_RET_BROKEN */
611 /* Define to 1 if you have the ANSI C header files. */
612 #define STDC_HEADERS 1
614 /* use default strptime. */
615 #define STRPTIME_WORKS 1
617 /* Use win32 resources and API */
618 /* #undef UB_ON_WINDOWS */
620 /* default username */
621 #define UB_USERNAME "unbound"
623 /* use to enable lightweight alloc assertions, for debug use */
624 /* #undef UNBOUND_ALLOC_LITE */
626 /* use malloc not regions, for debug use */
627 /* #undef UNBOUND_ALLOC_NONREGIONAL */
629 /* use statistics for allocs and frees, for debug use */
630 /* #undef UNBOUND_ALLOC_STATS */
632 /* define this to enable debug checks. */
633 /* #undef UNBOUND_DEBUG */
635 /* Define to 1 to use cachedb support */
636 /* #undef USE_CACHEDB */
638 /* Define to 1 to enable dnstap support */
639 /* #undef USE_DNSTAP */
641 /* Define this to enable DSA support. */
644 /* Define this to enable ECDSA support. */
647 /* Define this to enable an EVP workaround for older openssl */
648 /* #undef USE_ECDSA_EVP_WORKAROUND */
650 /* Define this to enable GOST support. */
653 /* Define if you want to use internal select based events */
654 #define USE_MINI_EVENT 1
656 /* Define this to enable client TCP Fast Open. */
657 /* #undef USE_MSG_FASTOPEN */
659 /* Define this to enable client TCP Fast Open. */
660 /* #undef USE_OSX_MSG_FASTOPEN */
662 /* Define this to enable SHA256 and SHA512 support. */
665 /* Enable extensions on AIX 3, Interix. */
667 # define _ALL_SOURCE 1
669 /* Enable GNU extensions on systems that have them. */
671 # define _GNU_SOURCE 1
673 /* Enable threading extensions on Solaris. */
674 #ifndef _POSIX_PTHREAD_SEMANTICS
675 # define _POSIX_PTHREAD_SEMANTICS 1
677 /* Enable extensions on HP NonStop. */
678 #ifndef _TANDEM_SOURCE
679 # define _TANDEM_SOURCE 1
681 /* Enable general extensions on Solaris. */
682 #ifndef __EXTENSIONS__
683 # define __EXTENSIONS__ 1
687 /* Define this to enable server TCP Fast Open. */
688 /* #undef USE_TCP_FASTOPEN */
690 /* Whether the windows socket API is used */
691 /* #undef USE_WINSOCK */
693 /* the version of the windows API enabled */
694 #define WINVER 0x0502
696 /* Define if you want Python module. */
697 /* #undef WITH_PYTHONMODULE */
699 /* Define if you want PyUnbound. */
700 /* #undef WITH_PYUNBOUND */
702 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
704 #define YYTEXT_POINTER 1
706 /* Enable large inode numbers on Mac OS X 10.5. */
707 #ifndef _DARWIN_USE_64_BIT_INODE
708 # define _DARWIN_USE_64_BIT_INODE 1
711 /* Number of bits in a file offset, on hosts where this is settable. */
712 /* #undef _FILE_OFFSET_BITS */
714 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
715 /* #undef _LARGEFILE_SOURCE */
717 /* Define for large files, on AIX-style hosts. */
718 /* #undef _LARGE_FILES */
720 /* Define to 1 if on MINIX. */
723 /* Enable for compile on Minix */
724 /* #undef _NETBSD_SOURCE */
726 /* Define to 2 if the system does not provide POSIX.1 features except with
728 /* #undef _POSIX_1_SOURCE */
730 /* Define to 1 if you need to in order for `stat' and other things to work. */
731 /* #undef _POSIX_SOURCE */
733 /* Define to empty if `const' does not conform to ANSI C. */
736 /* Define to `int' if <sys/types.h> doesn't define. */
740 /* #undef in_addr_t */
743 /* #undef in_port_t */
745 /* Define to `__inline__' or `__inline' if that's what the C compiler
746 calls it, or to nothing if 'inline' is not supported under any name. */
751 /* Define to `short' if <sys/types.h> does not define. */
754 /* Define to `int' if <sys/types.h> does not define. */
757 /* Define to `long long' if <sys/types.h> does not define. */
760 /* Define to `signed char' if <sys/types.h> does not define. */
763 /* Define if replacement function should be used. */
766 /* Define to `long int' if <sys/types.h> does not define. */
769 /* Define to `int' if <sys/types.h> does not define. */
772 /* Define to 'int' if not defined */
775 /* Define to `unsigned int' if <sys/types.h> does not define. */
778 /* Define to 'int' if not defined */
779 /* #undef socklen_t */
781 /* Define to `int' if <sys/types.h> does not define. */
784 /* Define to 'unsigned char if not defined */
787 /* Define to `int' if <sys/types.h> doesn't define. */
790 /* Define to `unsigned short' if <sys/types.h> does not define. */
791 /* #undef uint16_t */
793 /* Define to `unsigned int' if <sys/types.h> does not define. */
794 /* #undef uint32_t */
796 /* Define to `unsigned long long' if <sys/types.h> does not define. */
797 /* #undef uint64_t */
799 /* Define to `unsigned char' if <sys/types.h> does not define. */
802 /* Define as `fork' if `vfork' does not work. */
805 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
806 #define _GNU_SOURCE 1
809 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
810 #define _BSD_SOURCE 1
813 #if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
814 #define _DEFAULT_SOURCE 1
817 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
818 #define __EXTENSIONS__ 1
821 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
822 #define _POSIX_C_SOURCE 200112
825 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
826 #define _XOPEN_SOURCE 600
829 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
830 #define _XOPEN_SOURCE_EXTENDED 1
833 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
834 #define _ALL_SOURCE 1
837 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
838 #define _LARGEFILE_SOURCE 1
844 #ifndef UNBOUND_DEBUG
848 /** Use small-ldns codebase */
851 # define LDNS_BUILD_CONFIG_HAVE_SSL 1
875 #include <sys/param.h>
878 #ifdef HAVE_SYS_SOCKET_H
879 #include <sys/socket.h>
882 #ifdef HAVE_SYS_UIO_H
886 #ifdef HAVE_NETINET_IN_H
887 #include <netinet/in.h>
890 #ifdef HAVE_NETINET_TCP_H
891 #include <netinet/tcp.h>
894 #ifdef HAVE_ARPA_INET_H
895 #include <arpa/inet.h>
898 #ifdef HAVE_WINSOCK2_H
899 #include <winsock2.h>
902 #ifdef HAVE_WS2TCPIP_H
903 #include <ws2tcpip.h>
909 #define ARG_LL "%I64"
913 #define AF_LOCAL AF_UNIX
918 #ifdef HAVE_ATTR_FORMAT
919 # define ATTR_FORMAT(archetype, string_index, first_to_check) \
920 __attribute__ ((format (archetype, string_index, first_to_check)))
921 #else /* !HAVE_ATTR_FORMAT */
922 # define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
923 #endif /* !HAVE_ATTR_FORMAT */
927 # define ATTR_UNUSED(x) x
928 #elif defined(__cplusplus)
929 # define ATTR_UNUSED(x)
930 #elif defined(HAVE_ATTR_UNUSED)
931 # define ATTR_UNUSED(x) x __attribute__((unused))
932 #else /* !HAVE_ATTR_UNUSED */
933 # define ATTR_UNUSED(x) x
934 #endif /* !HAVE_ATTR_UNUSED */
940 #endif /* HAVE_FSEEKO */
943 #ifndef MAXHOSTNAMELEN
944 #define MAXHOSTNAMELEN 256
947 #if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
948 #define snprintf snprintf_unbound
949 #define vsnprintf vsnprintf_unbound
951 int snprintf (char *str, size_t count, const char *fmt, ...);
952 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
953 #endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
955 #ifndef HAVE_INET_PTON
956 #define inet_pton inet_pton_unbound
957 int inet_pton(int af, const char* src, void* dst);
958 #endif /* HAVE_INET_PTON */
961 #ifndef HAVE_INET_NTOP
962 #define inet_ntop inet_ntop_unbound
963 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
967 #ifndef HAVE_INET_ATON
968 #define inet_aton inet_aton_unbound
969 int inet_aton(const char *cp, struct in_addr *addr);
974 #define memmove memmove_unbound
975 void *memmove(void *dest, const void *src, size_t n);
980 #define strlcat strlcat_unbound
981 size_t strlcat(char *dst, const char *src, size_t siz);
986 #define strlcpy strlcpy_unbound
987 size_t strlcpy(char *dst, const char *src, size_t siz);
991 #ifndef HAVE_GMTIME_R
992 #define gmtime_r gmtime_r_unbound
993 struct tm *gmtime_r(const time_t *timep, struct tm *result);
997 #ifndef HAVE_REALLOCARRAY
998 #define reallocarray reallocarrayunbound
999 void* reallocarray(void *ptr, size_t nmemb, size_t size);
1003 #if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1004 #define sleep(x) Sleep((x)*1000) /* on win32 */
1005 #endif /* HAVE_SLEEP */
1009 #define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1010 #endif /* HAVE_USLEEP */
1014 #define random rand /* on win32, for tests only (bad random) */
1015 #endif /* HAVE_RANDOM */
1018 #ifndef HAVE_SRANDOM
1019 #define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1020 #endif /* HAVE_SRANDOM */
1023 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1024 #ifdef HAVE_WINSOCK2_H
1025 #define FD_SET_T (u_int)
1031 #ifndef IPV6_MIN_MTU
1032 #define IPV6_MIN_MTU 1280
1033 #endif /* IPV6_MIN_MTU */
1036 #ifdef MEMCMP_IS_BROKEN
1037 #include "compat/memcmp.h"
1038 #define memcmp memcmp_unbound
1039 int memcmp(const void *x, const void *y, size_t n);
1044 #ifndef HAVE_CTIME_R
1045 #define ctime_r unbound_ctime_r
1046 char *ctime_r(const time_t *timep, char *buf);
1050 #define strsep unbound_strsep
1051 char *strsep(char **stringp, const char *delim);
1054 #ifndef HAVE_ISBLANK
1055 #define isblank unbound_isblank
1059 #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1060 #define strptime unbound_strptime
1062 char *strptime(const char *s, const char *format, struct tm *tm);
1065 #ifdef HAVE_LIBRESSL
1066 # if !HAVE_DECL_STRLCPY
1067 size_t strlcpy(char *dst, const char *src, size_t siz);
1069 # if !HAVE_DECL_STRLCAT
1070 size_t strlcat(char *dst, const char *src, size_t siz);
1072 # if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1073 uint32_t arc4random(void);
1075 # if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1076 uint32_t arc4random_uniform(uint32_t upper_bound);
1078 # if !HAVE_DECL_REALLOCARRAY
1079 void *reallocarray(void *ptr, size_t nmemb, size_t size);
1081 #endif /* HAVE_LIBRESSL */
1082 #ifndef HAVE_ARC4RANDOM
1083 void explicit_bzero(void* buf, size_t len);
1084 int getentropy(void* buf, size_t len);
1085 uint32_t arc4random(void);
1086 void arc4random_buf(void* buf, size_t n);
1087 void _ARC4_LOCK(void);
1088 void _ARC4_UNLOCK(void);
1090 #ifndef HAVE_ARC4RANDOM_UNIFORM
1091 uint32_t arc4random_uniform(uint32_t upper_bound);
1093 #ifdef COMPAT_SHA512
1094 #ifndef SHA512_DIGEST_LENGTH
1095 #define SHA512_BLOCK_LENGTH 128
1096 #define SHA512_DIGEST_LENGTH 64
1097 #define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
1098 typedef struct _SHA512_CTX {
1100 uint64_t bitcount[2];
1101 uint8_t buffer[SHA512_BLOCK_LENGTH];
1103 #endif /* SHA512_DIGEST_LENGTH */
1104 void SHA512_Init(SHA512_CTX*);
1105 void SHA512_Update(SHA512_CTX*, void*, size_t);
1106 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1107 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1108 #endif /* COMPAT_SHA512 */
1112 #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))
1113 /* using version of libevent that is not threadsafe. */
1114 # define LIBEVENT_SIGNAL_PROBLEM 1
1117 #ifndef CHECKED_INET6
1118 # define CHECKED_INET6
1122 # define AF_INET6 28
1124 #endif /* CHECKED_INET6 */
1126 #ifndef HAVE_GETADDRINFO
1127 struct sockaddr_storage;
1128 #include "compat/fake-rfc2553.h"
1131 #ifdef UNBOUND_ALLOC_STATS
1132 # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1133 # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1134 # define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1135 # define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1136 void *unbound_stat_malloc(size_t size);
1137 void *unbound_stat_calloc(size_t nmemb, size_t size);
1138 void unbound_stat_free(void *ptr);
1139 void *unbound_stat_realloc(void *ptr, size_t size);
1140 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1142 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1143 int line, const char* func);
1144 void unbound_stat_free_log(void *ptr, const char* file, int line,
1146 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1147 int line, const char* func);
1148 #elif defined(UNBOUND_ALLOC_LITE)
1149 # include "util/alloc.h"
1150 #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1152 /** default port for DNS traffic. */
1153 #define UNBOUND_DNS_PORT 53
1154 /** default port for unbound control traffic, registered port with IANA,
1155 ub-dns-control 8953/tcp unbound dns nameserver control */
1156 #define UNBOUND_CONTROL_PORT 8953
1157 /** the version of unbound-control that this software implements */
1158 #define UNBOUND_CONTROL_VERSION 1