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