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