1/* config.h.in. Generated from configure.ac by autoheader. */ 2 3/* Directory to chroot to */ 4#undef CHROOT_DIR 5 6/* Do sha512 definitions in config.h */ 7#undef COMPAT_SHA512 8 9/* Pathname to the Unbound configuration file */ 10#undef CONFIGFILE 11 12/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work 13 */ 14#undef DARWIN_BROKEN_SETREUID 15 16/* Whether daemon is deprecated */ 17#undef DEPRECATED_DAEMON 18 19/* default dnstap socket path */ 20#undef DNSTAP_SOCKET_PATH 21 22/* Define if you want to use debug lock checking (slow). */ 23#undef ENABLE_LOCK_CHECKS 24 25/* Define this if you enabled-allsymbols from libunbound to link binaries to 26 it for smaller install size, but the libunbound export table is polluted by 27 internal symbols */ 28#undef EXPORT_ALL_SYMBOLS 29 30/* Define to 1 if you have the `arc4random' function. */ 31#undef HAVE_ARC4RANDOM 32 33/* Define to 1 if you have the `arc4random_uniform' function. */ 34#undef HAVE_ARC4RANDOM_UNIFORM 35 36/* Define to 1 if you have the <arpa/inet.h> header file. */ 37#undef HAVE_ARPA_INET_H 38 39/* Whether the C compiler accepts the "format" attribute */ 40#undef HAVE_ATTR_FORMAT 41 42/* Whether the C compiler accepts the "unused" attribute */ 43#undef HAVE_ATTR_UNUSED 44 45/* Whether the C compiler accepts the "weak" attribute */ 46#undef HAVE_ATTR_WEAK 47 48/* Define to 1 if you have the `chown' function. */ 49#undef HAVE_CHOWN 50 51/* Define to 1 if you have the `chroot' function. */ 52#undef HAVE_CHROOT 53 54/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ 55#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 56 57/* Define to 1 if you have the `ctime_r' function. */ 58#undef HAVE_CTIME_R 59 60/* Define to 1 if you have the `daemon' function. */ 61#undef HAVE_DAEMON 62 63/* Define to 1 if you have the declaration of `arc4random', and to 0 if you 64 don't. */ 65#undef HAVE_DECL_ARC4RANDOM 66 67/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0 68 if you don't. */ 69#undef HAVE_DECL_ARC4RANDOM_UNIFORM 70 71/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you 72 don't. */ 73#undef HAVE_DECL_NID_SECP384R1 74 75/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 76 if you don't. */ 77#undef HAVE_DECL_NID_X9_62_PRIME256V1 78 79/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you 80 don't. */ 81#undef HAVE_DECL_REALLOCARRAY 82 83/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 84 if you don't. */ 85#undef HAVE_DECL_SK_SSL_COMP_POP_FREE 86 87/* Define to 1 if you have the declaration of 88 `SSL_COMP_get_compression_methods', and to 0 if you don't. */ 89#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 90 91/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to 92 0 if you don't. */ 93#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 94 95/* Define to 1 if you have the declaration of `strlcat', and to 0 if you 96 don't. */ 97#undef HAVE_DECL_STRLCAT 98 99/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you 100 don't. */ 101#undef HAVE_DECL_STRLCPY 102 103/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if 104 you don't. */ 105#undef HAVE_DECL_XML_STOPPARSER 106 107/* Define to 1 if you have the <dlfcn.h> header file. */ 108#undef HAVE_DLFCN_H 109 110/* Define to 1 if you have the <endian.h> header file. */ 111#undef HAVE_ENDIAN_H 112 113/* Define to 1 if you have the `endprotoent' function. */ 114#undef HAVE_ENDPROTOENT 115 116/* Define to 1 if you have the `endpwent' function. */ 117#undef HAVE_ENDPWENT 118 119/* Define to 1 if you have the `endservent' function. */ 120#undef HAVE_ENDSERVENT 121 122/* Define to 1 if you have the `ERR_free_strings' function. */ 123#undef HAVE_ERR_FREE_STRINGS 124 125/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ 126#undef HAVE_ERR_LOAD_CRYPTO_STRINGS 127 128/* Define to 1 if you have the `event_base_free' function. */ 129#undef HAVE_EVENT_BASE_FREE 130 131/* Define to 1 if you have the `event_base_get_method' function. */ 132#undef HAVE_EVENT_BASE_GET_METHOD 133 134/* Define to 1 if you have the `event_base_new' function. */ 135#undef HAVE_EVENT_BASE_NEW 136 137/* Define to 1 if you have the `event_base_once' function. */ 138#undef HAVE_EVENT_BASE_ONCE 139 140/* Define to 1 if you have the <event.h> header file. */ 141#undef HAVE_EVENT_H 142 143/* Define to 1 if you have the `EVP_cleanup' function. */ 144#undef HAVE_EVP_CLEANUP 145 146/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ 147#undef HAVE_EVP_MD_CTX_NEW 148 149/* Define to 1 if you have the `EVP_sha1' function. */ 150#undef HAVE_EVP_SHA1 151 152/* Define to 1 if you have the `EVP_sha256' function. */ 153#undef HAVE_EVP_SHA256 154 155/* Define to 1 if you have the `EVP_sha512' function. */ 156#undef HAVE_EVP_SHA512 157 158/* Define to 1 if you have the `ev_default_loop' function. */ 159#undef HAVE_EV_DEFAULT_LOOP 160 161/* Define to 1 if you have the `ev_loop' function. */ 162#undef HAVE_EV_LOOP 163 164/* Define to 1 if you have the <expat.h> header file. */ 165#undef HAVE_EXPAT_H 166 167/* Define to 1 if you have the `fcntl' function. */ 168#undef HAVE_FCNTL 169 170/* Define to 1 if you have the `FIPS_mode' function. */ 171#undef HAVE_FIPS_MODE 172 173/* Define to 1 if you have the `fork' function. */ 174#undef HAVE_FORK 175 176/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ 177#undef HAVE_FSEEKO 178 179/* Define to 1 if you have the `fsync' function. */ 180#undef HAVE_FSYNC 181 182/* Whether getaddrinfo is available */ 183#undef HAVE_GETADDRINFO 184 185/* Define to 1 if you have the `getauxval' function. */ 186#undef HAVE_GETAUXVAL 187 188/* Define to 1 if you have the `getentropy' function. */ 189#undef HAVE_GETENTROPY 190 191/* Define to 1 if you have the <getopt.h> header file. */ 192#undef HAVE_GETOPT_H 193 194/* Define to 1 if you have the `getpwnam' function. */ 195#undef HAVE_GETPWNAM 196 197/* Define to 1 if you have the `getrlimit' function. */ 198#undef HAVE_GETRLIMIT 199 200/* Define to 1 if you have the `glob' function. */ 201#undef HAVE_GLOB 202 203/* Define to 1 if you have the <glob.h> header file. */ 204#undef HAVE_GLOB_H 205 206/* Define to 1 if you have the `gmtime_r' function. */ 207#undef HAVE_GMTIME_R 208 209/* Define to 1 if you have the <grp.h> header file. */ 210#undef HAVE_GRP_H 211 212/* If you have HMAC_Update */ 213#undef HAVE_HMAC_UPDATE 214 215/* Define to 1 if you have the `inet_aton' function. */ 216#undef HAVE_INET_ATON 217 218/* Define to 1 if you have the `inet_ntop' function. */ 219#undef HAVE_INET_NTOP 220 221/* Define to 1 if you have the `inet_pton' function. */ 222#undef HAVE_INET_PTON 223 224/* Define to 1 if you have the `initgroups' function. */ 225#undef HAVE_INITGROUPS 226 227/* Define to 1 if you have the <inttypes.h> header file. */ 228#undef HAVE_INTTYPES_H 229 230/* if the function 'ioctlsocket' is available */ 231#undef HAVE_IOCTLSOCKET 232 233/* Define to 1 if you have the <iphlpapi.h> header file. */ 234#undef HAVE_IPHLPAPI_H 235 236/* Define to 1 if you have the `isblank' function. */ 237#undef HAVE_ISBLANK 238 239/* Define to 1 if you have the `kill' function. */ 240#undef HAVE_KILL 241 242/* Define if we have LibreSSL */ 243#undef HAVE_LIBRESSL 244 245/* Define to 1 if you have the `localtime_r' function. */ 246#undef HAVE_LOCALTIME_R 247 248/* Define to 1 if you have the <login_cap.h> header file. */ 249#undef HAVE_LOGIN_CAP_H 250 251/* If have GNU libc compatible malloc */ 252#undef HAVE_MALLOC 253 254/* Define to 1 if you have the `memmove' function. */ 255#undef HAVE_MEMMOVE 256 257/* Define to 1 if you have the <memory.h> header file. */ 258#undef HAVE_MEMORY_H 259 260/* Define to 1 if you have the <netdb.h> header file. */ 261#undef HAVE_NETDB_H 262 263/* Define to 1 if you have the <netinet/in.h> header file. */ 264#undef HAVE_NETINET_IN_H 265 266/* Define to 1 if you have the <netinet/tcp.h> header file. */ 267#undef HAVE_NETINET_TCP_H 268 269/* Use libnettle for crypto */ 270#undef HAVE_NETTLE 271 272/* Define to 1 if you have the <nettle/dsa-compat.h> header file. */ 273#undef HAVE_NETTLE_DSA_COMPAT_H 274 275/* Use libnss for crypto */ 276#undef HAVE_NSS 277 278/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ 279#undef HAVE_OPENSSL_ADD_ALL_DIGESTS 280 281/* Define to 1 if you have the <openssl/bn.h> header file. */ 282#undef HAVE_OPENSSL_BN_H 283 284/* Define to 1 if you have the `OPENSSL_config' function. */ 285#undef HAVE_OPENSSL_CONFIG 286 287/* Define to 1 if you have the <openssl/conf.h> header file. */ 288#undef HAVE_OPENSSL_CONF_H 289 290/* Define to 1 if you have the <openssl/dh.h> header file. */ 291#undef HAVE_OPENSSL_DH_H 292 293/* Define to 1 if you have the <openssl/dsa.h> header file. */ 294#undef HAVE_OPENSSL_DSA_H 295 296/* Define to 1 if you have the <openssl/engine.h> header file. */ 297#undef HAVE_OPENSSL_ENGINE_H 298 299/* Define to 1 if you have the <openssl/err.h> header file. */ 300#undef HAVE_OPENSSL_ERR_H 301 302/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ 303#undef HAVE_OPENSSL_INIT_CRYPTO 304 305/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ 306#undef HAVE_OPENSSL_INIT_SSL 307 308/* Define to 1 if you have the <openssl/rand.h> header file. */ 309#undef HAVE_OPENSSL_RAND_H 310 311/* Define to 1 if you have the <openssl/rsa.h> header file. */ 312#undef HAVE_OPENSSL_RSA_H 313 314/* Define to 1 if you have the <openssl/ssl.h> header file. */ 315#undef HAVE_OPENSSL_SSL_H 316 317/* Define if you have POSIX threads libraries and header files. */ 318#undef HAVE_PTHREAD 319 320/* Have PTHREAD_PRIO_INHERIT. */ 321#undef HAVE_PTHREAD_PRIO_INHERIT 322 323/* Define to 1 if the system has the type `pthread_rwlock_t'. */ 324#undef HAVE_PTHREAD_RWLOCK_T 325 326/* Define to 1 if the system has the type `pthread_spinlock_t'. */ 327#undef HAVE_PTHREAD_SPINLOCK_T 328 329/* Define to 1 if you have the <pwd.h> header file. */ 330#undef HAVE_PWD_H 331 332/* Define if you have Python libraries and header files. */ 333#undef HAVE_PYTHON 334 335/* Define to 1 if you have the `random' function. */ 336#undef HAVE_RANDOM 337 338/* Define to 1 if you have the `RAND_cleanup' function. */ 339#undef HAVE_RAND_CLEANUP 340 341/* Define to 1 if you have the `reallocarray' function. */ 342#undef HAVE_REALLOCARRAY 343 344/* Define to 1 if you have the `recvmsg' function. */ 345#undef HAVE_RECVMSG 346 347/* define if you have the sbrk() call */ 348#undef HAVE_SBRK 349 350/* Define to 1 if you have the `sendmsg' function. */ 351#undef HAVE_SENDMSG 352 353/* Define to 1 if you have the `setregid' function. */ 354#undef HAVE_SETREGID 355 356/* Define to 1 if you have the `setresgid' function. */ 357#undef HAVE_SETRESGID 358 359/* Define to 1 if you have the `setresuid' function. */ 360#undef HAVE_SETRESUID 361 362/* Define to 1 if you have the `setreuid' function. */ 363#undef HAVE_SETREUID 364 365/* Define to 1 if you have the `setrlimit' function. */ 366#undef HAVE_SETRLIMIT 367 368/* Define to 1 if you have the `setsid' function. */ 369#undef HAVE_SETSID 370 371/* Define to 1 if you have the `setusercontext' function. */ 372#undef HAVE_SETUSERCONTEXT 373 374/* Define to 1 if you have the `SHA512_Update' function. */ 375#undef HAVE_SHA512_UPDATE 376 377/* Define to 1 if you have the `sigprocmask' function. */ 378#undef HAVE_SIGPROCMASK 379 380/* Define to 1 if you have the `sleep' function. */ 381#undef HAVE_SLEEP 382 383/* Define to 1 if you have the `snprintf' function. */ 384#undef HAVE_SNPRINTF 385 386/* Define to 1 if you have the `socketpair' function. */ 387#undef HAVE_SOCKETPAIR 388 389/* Using Solaris threads */ 390#undef HAVE_SOLARIS_THREADS 391 392/* Define to 1 if you have the `srandom' function. */ 393#undef HAVE_SRANDOM 394 395/* Define if you have the SSL libraries installed. */ 396#undef HAVE_SSL 397 398/* Define to 1 if you have the <stdarg.h> header file. */ 399#undef HAVE_STDARG_H 400 401/* Define to 1 if you have the <stdbool.h> header file. */ 402#undef HAVE_STDBOOL_H 403 404/* Define to 1 if you have the <stdint.h> header file. */ 405#undef HAVE_STDINT_H 406 407/* Define to 1 if you have the <stdlib.h> header file. */ 408#undef HAVE_STDLIB_H 409 410/* Define to 1 if you have the `strftime' function. */ 411#undef HAVE_STRFTIME 412 413/* Define to 1 if you have the <strings.h> header file. */ 414#undef HAVE_STRINGS_H 415 416/* Define to 1 if you have the <string.h> header file. */ 417#undef HAVE_STRING_H 418 419/* Define to 1 if you have the `strlcat' function. */ 420#undef HAVE_STRLCAT 421 422/* Define to 1 if you have the `strlcpy' function. */ 423#undef HAVE_STRLCPY 424 425/* Define to 1 if you have the `strptime' function. */ 426#undef HAVE_STRPTIME 427 428/* Define to 1 if you have the `strsep' function. */ 429#undef HAVE_STRSEP 430 431/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ 432#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 433 434/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ 435#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 436 437/* Define if you have Swig libraries and header files. */ 438#undef HAVE_SWIG 439 440/* Define to 1 if you have the <syslog.h> header file. */ 441#undef HAVE_SYSLOG_H 442 443/* Define to 1 if you have the <sys/param.h> header file. */ 444#undef HAVE_SYS_PARAM_H 445 446/* Define to 1 if you have the <sys/resource.h> header file. */ 447#undef HAVE_SYS_RESOURCE_H 448 449/* Define to 1 if you have the <sys/sha2.h> header file. */ 450#undef HAVE_SYS_SHA2_H 451 452/* Define to 1 if you have the <sys/socket.h> header file. */ 453#undef HAVE_SYS_SOCKET_H 454 455/* Define to 1 if you have the <sys/stat.h> header file. */ 456#undef HAVE_SYS_STAT_H 457 458/* Define to 1 if you have the <sys/sysctl.h> header file. */ 459#undef HAVE_SYS_SYSCTL_H 460 461/* Define to 1 if you have the <sys/types.h> header file. */ 462#undef HAVE_SYS_TYPES_H 463 464/* Define to 1 if you have the <sys/uio.h> header file. */ 465#undef HAVE_SYS_UIO_H 466 467/* Define to 1 if you have the <sys/un.h> header file. */ 468#undef HAVE_SYS_UN_H 469 470/* Define to 1 if you have the <sys/wait.h> header file. */ 471#undef HAVE_SYS_WAIT_H 472 473/* Define to 1 if you have the <time.h> header file. */ 474#undef HAVE_TIME_H 475 476/* Define to 1 if you have the `tzset' function. */ 477#undef HAVE_TZSET 478 479/* Define to 1 if you have the <unistd.h> header file. */ 480#undef HAVE_UNISTD_H 481 482/* Define to 1 if you have the `usleep' function. */ 483#undef HAVE_USLEEP 484 485/* Define to 1 if you have the `vfork' function. */ 486#undef HAVE_VFORK 487 488/* Define to 1 if you have the <vfork.h> header file. */ 489#undef HAVE_VFORK_H 490 491/* Define to 1 if you have the <windows.h> header file. */ 492#undef HAVE_WINDOWS_H 493 494/* Using Windows threads */ 495#undef HAVE_WINDOWS_THREADS 496 497/* Define to 1 if you have the <winsock2.h> header file. */ 498#undef HAVE_WINSOCK2_H 499 500/* Define to 1 if `fork' works. */ 501#undef HAVE_WORKING_FORK 502 503/* Define to 1 if `vfork' works. */ 504#undef HAVE_WORKING_VFORK 505 506/* Define to 1 if you have the `writev' function. */ 507#undef HAVE_WRITEV 508 509/* Define to 1 if you have the <ws2tcpip.h> header file. */ 510#undef HAVE_WS2TCPIP_H 511 512/* Define to 1 if you have the `_beginthreadex' function. */ 513#undef HAVE__BEGINTHREADEX 514 515/* if lex has yylex_destroy */ 516#undef LEX_HAS_YYLEX_DESTROY 517 518/* Define to the sub-directory where libtool stores uninstalled libraries. */ 519#undef LT_OBJDIR 520 521/* Define to the maximum message length to pass to syslog. */ 522#undef MAXSYSLOGMSGLEN 523 524/* Define if memcmp() does not compare unsigned bytes */ 525#undef MEMCMP_IS_BROKEN 526 527/* Define if mkdir has one argument. */ 528#undef MKDIR_HAS_ONE_ARG 529 530/* Define if the network stack does not fully support nonblocking io (causes 531 lower performance). */ 532#undef NONBLOCKING_IS_BROKEN 533 534/* Put -D_ALL_SOURCE define in config.h */ 535#undef OMITTED__D_ALL_SOURCE 536 537/* Put -D_BSD_SOURCE define in config.h */ 538#undef OMITTED__D_BSD_SOURCE 539 540/* Put -D_DEFAULT_SOURCE define in config.h */ 541#undef OMITTED__D_DEFAULT_SOURCE 542 543/* Put -D_GNU_SOURCE define in config.h */ 544#undef OMITTED__D_GNU_SOURCE 545 546/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ 547#undef OMITTED__D_LARGEFILE_SOURCE_1 548 549/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ 550#undef OMITTED__D_POSIX_C_SOURCE_200112 551 552/* Put -D_XOPEN_SOURCE=600 define in config.h */ 553#undef OMITTED__D_XOPEN_SOURCE_600 554 555/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ 556#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 557 558/* Put -D__EXTENSIONS__ define in config.h */ 559#undef OMITTED__D__EXTENSIONS__ 560 561/* Define to the address where bug reports for this package should be sent. */ 562#undef PACKAGE_BUGREPORT 563 564/* Define to the full name of this package. */ 565#undef PACKAGE_NAME 566 567/* Define to the full name and version of this package. */ 568#undef PACKAGE_STRING 569 570/* Define to the one symbol short name of this package. */ 571#undef PACKAGE_TARNAME 572 573/* Define to the home page for this package. */ 574#undef PACKAGE_URL 575 576/* Define to the version of this package. */ 577#undef PACKAGE_VERSION 578 579/* default pidfile location */ 580#undef PIDFILE 581 582/* Define to necessary symbol if this constant uses a non-standard name on 583 your system. */ 584#undef PTHREAD_CREATE_JOINABLE 585 586/* Define as the return type of signal handlers (`int' or `void'). */ 587#undef RETSIGTYPE 588 589/* default rootkey location */ 590#undef ROOT_ANCHOR_FILE 591 592/* default rootcert location */ 593#undef ROOT_CERT_FILE 594 595/* version number for resource files */ 596#undef RSRC_PACKAGE_VERSION 597 598/* Directory to chdir to */ 599#undef RUN_DIR 600 601/* Shared data */ 602#undef SHARE_DIR 603 604/* The size of `time_t', as computed by sizeof. */ 605#undef SIZEOF_TIME_T 606 607/* define if (v)snprintf does not return length needed, (but length used) */ 608#undef SNPRINTF_RET_BROKEN 609 610/* Define to 1 if you have the ANSI C header files. */ 611#undef STDC_HEADERS 612 613/* use default strptime. */ 614#undef STRPTIME_WORKS 615 616/* Use win32 resources and API */ 617#undef UB_ON_WINDOWS 618 619/* default username */ 620#undef UB_USERNAME 621 622/* use to enable lightweight alloc assertions, for debug use */ 623#undef UNBOUND_ALLOC_LITE 624 625/* use malloc not regions, for debug use */ 626#undef UNBOUND_ALLOC_NONREGIONAL 627 628/* use statistics for allocs and frees, for debug use */ 629#undef UNBOUND_ALLOC_STATS 630 631/* define this to enable debug checks. */ 632#undef UNBOUND_DEBUG 633 634/* Define to 1 to use cachedb support */ 635#undef USE_CACHEDB 636 637/* Define to 1 to enable dnstap support */ 638#undef USE_DNSTAP 639 640/* Define this to enable DSA support. */ 641#undef USE_DSA 642 643/* Define this to enable ECDSA support. */ 644#undef USE_ECDSA 645 646/* Define this to enable an EVP workaround for older openssl */ 647#undef USE_ECDSA_EVP_WORKAROUND 648 649/* Define this to enable GOST support. */ 650#undef USE_GOST 651 652/* Define if you want to use internal select based events */ 653#undef USE_MINI_EVENT 654 655/* Define this to enable client TCP Fast Open. */ 656#undef USE_MSG_FASTOPEN 657 658/* Define this to enable client TCP Fast Open. */ 659#undef USE_OSX_MSG_FASTOPEN 660 661/* Define this to enable SHA256 and SHA512 support. */ 662#undef USE_SHA2 663 664/* Enable extensions on AIX 3, Interix. */ 665#ifndef _ALL_SOURCE 666# undef _ALL_SOURCE 667#endif 668/* Enable GNU extensions on systems that have them. */ 669#ifndef _GNU_SOURCE 670# undef _GNU_SOURCE 671#endif 672/* Enable threading extensions on Solaris. */ 673#ifndef _POSIX_PTHREAD_SEMANTICS 674# undef _POSIX_PTHREAD_SEMANTICS 675#endif 676/* Enable extensions on HP NonStop. */ 677#ifndef _TANDEM_SOURCE 678# undef _TANDEM_SOURCE 679#endif 680/* Enable general extensions on Solaris. */ 681#ifndef __EXTENSIONS__ 682# undef __EXTENSIONS__ 683#endif 684 685 686/* Define this to enable server TCP Fast Open. */ 687#undef USE_TCP_FASTOPEN 688 689/* Whether the windows socket API is used */ 690#undef USE_WINSOCK 691 692/* the version of the windows API enabled */ 693#undef WINVER 694 695/* Define if you want Python module. */ 696#undef WITH_PYTHONMODULE 697 698/* Define if you want PyUnbound. */ 699#undef WITH_PYUNBOUND 700 701/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a 702 `char[]'. */ 703#undef YYTEXT_POINTER 704 705/* Enable large inode numbers on Mac OS X 10.5. */ 706#ifndef _DARWIN_USE_64_BIT_INODE 707# define _DARWIN_USE_64_BIT_INODE 1 708#endif 709 710/* Number of bits in a file offset, on hosts where this is settable. */ 711#undef _FILE_OFFSET_BITS 712 713/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 714#undef _LARGEFILE_SOURCE 715 716/* Define for large files, on AIX-style hosts. */ 717#undef _LARGE_FILES 718 719/* Define to 1 if on MINIX. */ 720#undef _MINIX 721 722/* Enable for compile on Minix */ 723#undef _NETBSD_SOURCE 724 725/* Define to 2 if the system does not provide POSIX.1 features except with 726 this defined. */ 727#undef _POSIX_1_SOURCE 728 729/* Define to 1 if you need to in order for `stat' and other things to work. */ 730#undef _POSIX_SOURCE 731 732/* Define to empty if `const' does not conform to ANSI C. */ 733#undef const 734 735/* Define to `int' if <sys/types.h> doesn't define. */ 736#undef gid_t 737 738/* in_addr_t */ 739#undef in_addr_t 740 741/* in_port_t */ 742#undef in_port_t 743 744/* Define to `__inline__' or `__inline' if that's what the C compiler 745 calls it, or to nothing if 'inline' is not supported under any name. */ 746#ifndef __cplusplus 747#undef inline 748#endif 749 750/* Define to `short' if <sys/types.h> does not define. */ 751#undef int16_t 752 753/* Define to `int' if <sys/types.h> does not define. */ 754#undef int32_t 755 756/* Define to `long long' if <sys/types.h> does not define. */ 757#undef int64_t 758 759/* Define to `signed char' if <sys/types.h> does not define. */ 760#undef int8_t 761 762/* Define if replacement function should be used. */ 763#undef malloc 764 765/* Define to `long int' if <sys/types.h> does not define. */ 766#undef off_t 767 768/* Define to `int' if <sys/types.h> does not define. */ 769#undef pid_t 770 771/* Define to 'int' if not defined */ 772#undef rlim_t 773 774/* Define to `unsigned int' if <sys/types.h> does not define. */ 775#undef size_t 776 777/* Define to 'int' if not defined */ 778#undef socklen_t 779 780/* Define to `int' if <sys/types.h> does not define. */ 781#undef ssize_t 782 783/* Define to 'unsigned char if not defined */ 784#undef u_char 785 786/* Define to `int' if <sys/types.h> doesn't define. */ 787#undef uid_t 788 789/* Define to `unsigned short' if <sys/types.h> does not define. */ 790#undef uint16_t 791 792/* Define to `unsigned int' if <sys/types.h> does not define. */ 793#undef uint32_t 794 795/* Define to `unsigned long long' if <sys/types.h> does not define. */ 796#undef uint64_t 797 798/* Define to `unsigned char' if <sys/types.h> does not define. */ 799#undef uint8_t 800 801/* Define as `fork' if `vfork' does not work. */ 802#undef vfork 803 804#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE) 805#define _GNU_SOURCE 1 806#endif 807 808#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE) 809#define _BSD_SOURCE 1 810#endif 811 812#if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE) 813#define _DEFAULT_SOURCE 1 814#endif 815 816#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__) 817#define __EXTENSIONS__ 1 818#endif 819 820#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE) 821#define _POSIX_C_SOURCE 200112 822#endif 823 824#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE) 825#define _XOPEN_SOURCE 600 826#endif 827 828#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED) 829#define _XOPEN_SOURCE_EXTENDED 1 830#endif 831 832#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE) 833#define _ALL_SOURCE 1 834#endif 835 836#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE) 837#define _LARGEFILE_SOURCE 1 838#endif 839 840 841 842 843#ifndef UNBOUND_DEBUG 844# define NDEBUG 845#endif 846 847/** Use small-ldns codebase */ 848#define USE_SLDNS 1 849#ifdef HAVE_SSL 850# define LDNS_BUILD_CONFIG_HAVE_SSL 1 851#endif 852 853#include <stdio.h> 854#include <string.h> 855#include <unistd.h> 856#include <assert.h> 857 858#if STDC_HEADERS 859#include <stdlib.h> 860#include <stddef.h> 861#endif 862 863#ifdef HAVE_STDARG_H 864#include <stdarg.h> 865#endif 866 867#ifdef HAVE_STDINT_H 868#include <stdint.h> 869#endif 870 871#include <errno.h> 872 873#if HAVE_SYS_PARAM_H 874#include <sys/param.h> 875#endif 876 877#ifdef HAVE_SYS_SOCKET_H 878#include <sys/socket.h> 879#endif 880 881#ifdef HAVE_SYS_UIO_H 882#include <sys/uio.h> 883#endif 884 885#ifdef HAVE_NETINET_IN_H 886#include <netinet/in.h> 887#endif 888 889#ifdef HAVE_NETINET_TCP_H 890#include <netinet/tcp.h> 891#endif 892 893#ifdef HAVE_ARPA_INET_H 894#include <arpa/inet.h> 895#endif 896 897#ifdef HAVE_WINSOCK2_H 898#include <winsock2.h> 899#endif 900 901#ifdef HAVE_WS2TCPIP_H 902#include <ws2tcpip.h> 903#endif 904 905#ifndef USE_WINSOCK 906#define ARG_LL "%ll" 907#else 908#define ARG_LL "%I64" 909#endif 910 911#ifndef AF_LOCAL 912#define AF_LOCAL AF_UNIX 913#endif 914 915 916 917#ifdef HAVE_ATTR_FORMAT 918# define ATTR_FORMAT(archetype, string_index, first_to_check) \ 919 __attribute__ ((format (archetype, string_index, first_to_check))) 920#else /* !HAVE_ATTR_FORMAT */ 921# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ 922#endif /* !HAVE_ATTR_FORMAT */ 923 924 925#if defined(DOXYGEN) 926# define ATTR_UNUSED(x) x 927#elif defined(__cplusplus) 928# define ATTR_UNUSED(x) 929#elif defined(HAVE_ATTR_UNUSED) 930# define ATTR_UNUSED(x) x __attribute__((unused)) 931#else /* !HAVE_ATTR_UNUSED */ 932# define ATTR_UNUSED(x) x 933#endif /* !HAVE_ATTR_UNUSED */ 934 935 936#ifndef HAVE_FSEEKO 937#define fseeko fseek 938#define ftello ftell 939#endif /* HAVE_FSEEKO */ 940 941 942#ifndef MAXHOSTNAMELEN 943#define MAXHOSTNAMELEN 256 944#endif 945 946#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) 947#define snprintf snprintf_unbound 948#define vsnprintf vsnprintf_unbound 949#include <stdarg.h> 950int snprintf (char *str, size_t count, const char *fmt, ...); 951int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); 952#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */ 953 954#ifndef HAVE_INET_PTON 955#define inet_pton inet_pton_unbound 956int inet_pton(int af, const char* src, void* dst); 957#endif /* HAVE_INET_PTON */ 958 959 960#ifndef HAVE_INET_NTOP 961#define inet_ntop inet_ntop_unbound 962const char *inet_ntop(int af, const void *src, char *dst, size_t size); 963#endif 964 965 966#ifndef HAVE_INET_ATON 967#define inet_aton inet_aton_unbound 968int inet_aton(const char *cp, struct in_addr *addr); 969#endif 970 971 972#ifndef HAVE_MEMMOVE 973#define memmove memmove_unbound 974void *memmove(void *dest, const void *src, size_t n); 975#endif 976 977 978#ifndef HAVE_STRLCAT 979#define strlcat strlcat_unbound 980size_t strlcat(char *dst, const char *src, size_t siz); 981#endif 982 983 984#ifndef HAVE_STRLCPY 985#define strlcpy strlcpy_unbound 986size_t strlcpy(char *dst, const char *src, size_t siz); 987#endif 988 989 990#ifndef HAVE_GMTIME_R 991#define gmtime_r gmtime_r_unbound 992struct tm *gmtime_r(const time_t *timep, struct tm *result); 993#endif 994 995 996#ifndef HAVE_REALLOCARRAY 997#define reallocarray reallocarrayunbound 998void* reallocarray(void *ptr, size_t nmemb, size_t size); 999#endif 1000 1001 1002#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H) 1003#define sleep(x) Sleep((x)*1000) /* on win32 */ 1004#endif /* HAVE_SLEEP */ 1005 1006 1007#ifndef HAVE_USLEEP 1008#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */ 1009#endif /* HAVE_USLEEP */ 1010 1011 1012#ifndef HAVE_RANDOM 1013#define random rand /* on win32, for tests only (bad random) */ 1014#endif /* HAVE_RANDOM */ 1015 1016 1017#ifndef HAVE_SRANDOM 1018#define srandom(x) srand(x) /* on win32, for tests only (bad random) */ 1019#endif /* HAVE_SRANDOM */ 1020 1021 1022/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */ 1023#ifdef HAVE_WINSOCK2_H 1024#define FD_SET_T (u_int) 1025#else 1026#define FD_SET_T 1027#endif 1028 1029 1030#ifndef IPV6_MIN_MTU 1031#define IPV6_MIN_MTU 1280 1032#endif /* IPV6_MIN_MTU */ 1033 1034 1035#ifdef MEMCMP_IS_BROKEN 1036#include "compat/memcmp.h" 1037#define memcmp memcmp_unbound 1038int memcmp(const void *x, const void *y, size_t n); 1039#endif 1040 1041 1042 1043#ifndef HAVE_CTIME_R 1044#define ctime_r unbound_ctime_r 1045char *ctime_r(const time_t *timep, char *buf); 1046#endif 1047 1048#ifndef HAVE_STRSEP 1049#define strsep unbound_strsep 1050char *strsep(char **stringp, const char *delim); 1051#endif 1052 1053#ifndef HAVE_ISBLANK 1054#define isblank unbound_isblank 1055int isblank(int c); 1056#endif 1057 1058#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) 1059#define strptime unbound_strptime 1060struct tm; 1061char *strptime(const char *s, const char *format, struct tm *tm); 1062#endif 1063 1064#ifdef HAVE_LIBRESSL 1065# if !HAVE_DECL_STRLCPY 1066size_t strlcpy(char *dst, const char *src, size_t siz); 1067# endif 1068# if !HAVE_DECL_STRLCAT 1069size_t strlcat(char *dst, const char *src, size_t siz); 1070# endif 1071# if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM) 1072uint32_t arc4random(void); 1073# endif 1074# if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM) 1075uint32_t arc4random_uniform(uint32_t upper_bound); 1076# endif 1077# if !HAVE_DECL_REALLOCARRAY 1078void *reallocarray(void *ptr, size_t nmemb, size_t size); 1079# endif 1080#endif /* HAVE_LIBRESSL */ 1081#ifndef HAVE_ARC4RANDOM 1082void explicit_bzero(void* buf, size_t len); 1083int getentropy(void* buf, size_t len); 1084uint32_t arc4random(void); 1085void arc4random_buf(void* buf, size_t n); 1086void _ARC4_LOCK(void); 1087void _ARC4_UNLOCK(void); 1088#endif 1089#ifndef HAVE_ARC4RANDOM_UNIFORM 1090uint32_t arc4random_uniform(uint32_t upper_bound); 1091#endif 1092#ifdef COMPAT_SHA512 1093#ifndef SHA512_DIGEST_LENGTH 1094#define SHA512_BLOCK_LENGTH 128 1095#define SHA512_DIGEST_LENGTH 64 1096#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) 1097typedef struct _SHA512_CTX { 1098 uint64_t state[8]; 1099 uint64_t bitcount[2]; 1100 uint8_t buffer[SHA512_BLOCK_LENGTH]; 1101} SHA512_CTX; 1102#endif /* SHA512_DIGEST_LENGTH */ 1103void SHA512_Init(SHA512_CTX*); 1104void SHA512_Update(SHA512_CTX*, void*, size_t); 1105void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*); 1106unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest); 1107#endif /* COMPAT_SHA512 */ 1108 1109 1110 1111#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)) 1112 /* using version of libevent that is not threadsafe. */ 1113# define LIBEVENT_SIGNAL_PROBLEM 1 1114#endif 1115 1116#ifndef CHECKED_INET6 1117# define CHECKED_INET6 1118# ifdef AF_INET6 1119# define INET6 1120# else 1121# define AF_INET6 28 1122# endif 1123#endif /* CHECKED_INET6 */ 1124 1125#ifndef HAVE_GETADDRINFO 1126struct sockaddr_storage; 1127#include "compat/fake-rfc2553.h" 1128#endif 1129 1130#ifdef UNBOUND_ALLOC_STATS 1131# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__) 1132# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__) 1133# define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__) 1134# define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__) 1135void *unbound_stat_malloc(size_t size); 1136void *unbound_stat_calloc(size_t nmemb, size_t size); 1137void unbound_stat_free(void *ptr); 1138void *unbound_stat_realloc(void *ptr, size_t size); 1139void *unbound_stat_malloc_log(size_t size, const char* file, int line, 1140 const char* func); 1141void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file, 1142 int line, const char* func); 1143void unbound_stat_free_log(void *ptr, const char* file, int line, 1144 const char* func); 1145void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, 1146 int line, const char* func); 1147#elif defined(UNBOUND_ALLOC_LITE) 1148# include "util/alloc.h" 1149#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */ 1150 1151/** default port for DNS traffic. */ 1152#define UNBOUND_DNS_PORT 53 1153/** default port for unbound control traffic, registered port with IANA, 1154 ub-dns-control 8953/tcp unbound dns nameserver control */ 1155#define UNBOUND_CONTROL_PORT 8953 1156/** the version of unbound-control that this software implements */ 1157#define UNBOUND_CONTROL_VERSION 1 1158 1159 1160