config.h.in revision 291767
1238106Sdes/* config.h.in. Generated from configure.ac by autoheader. */ 2238106Sdes 3238106Sdes/* Directory to chroot to */ 4238106Sdes#undef CHROOT_DIR 5238106Sdes 6285206Sdes/* Do sha512 definitions in config.h */ 7285206Sdes#undef COMPAT_SHA512 8285206Sdes 9238106Sdes/* Pathname to the Unbound configuration file */ 10238106Sdes#undef CONFIGFILE 11238106Sdes 12238106Sdes/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work 13238106Sdes */ 14238106Sdes#undef DARWIN_BROKEN_SETREUID 15238106Sdes 16238106Sdes/* Whether daemon is deprecated */ 17238106Sdes#undef DEPRECATED_DAEMON 18238106Sdes 19285206Sdes/* default dnstap socket path */ 20285206Sdes#undef DNSTAP_SOCKET_PATH 21285206Sdes 22238106Sdes/* Define if you want to use debug lock checking (slow). */ 23238106Sdes#undef ENABLE_LOCK_CHECKS 24238106Sdes 25238106Sdes/* Define this if you enabled-allsymbols from libunbound to link binaries to 26238106Sdes it for smaller install size, but the libunbound export table is polluted by 27238106Sdes internal symbols */ 28238106Sdes#undef EXPORT_ALL_SYMBOLS 29238106Sdes 30285206Sdes/* Define to 1 if you have the `arc4random' function. */ 31285206Sdes#undef HAVE_ARC4RANDOM 32285206Sdes 33285206Sdes/* Define to 1 if you have the `arc4random_uniform' function. */ 34285206Sdes#undef HAVE_ARC4RANDOM_UNIFORM 35285206Sdes 36238106Sdes/* Define to 1 if you have the <arpa/inet.h> header file. */ 37238106Sdes#undef HAVE_ARPA_INET_H 38238106Sdes 39238106Sdes/* Whether the C compiler accepts the "format" attribute */ 40238106Sdes#undef HAVE_ATTR_FORMAT 41238106Sdes 42238106Sdes/* Whether the C compiler accepts the "unused" attribute */ 43238106Sdes#undef HAVE_ATTR_UNUSED 44238106Sdes 45285206Sdes/* Define to 1 if you have the `chown' function. */ 46238106Sdes#undef HAVE_CHOWN 47238106Sdes 48238106Sdes/* Define to 1 if you have the `chroot' function. */ 49238106Sdes#undef HAVE_CHROOT 50238106Sdes 51238106Sdes/* Define to 1 if you have the `ctime_r' function. */ 52238106Sdes#undef HAVE_CTIME_R 53238106Sdes 54238106Sdes/* Define to 1 if you have the `daemon' function. */ 55238106Sdes#undef HAVE_DAEMON 56238106Sdes 57285206Sdes/* Define to 1 if you have the declaration of `arc4random', and to 0 if you 58285206Sdes don't. */ 59285206Sdes#undef HAVE_DECL_ARC4RANDOM 60285206Sdes 61285206Sdes/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0 62285206Sdes if you don't. */ 63285206Sdes#undef HAVE_DECL_ARC4RANDOM_UNIFORM 64285206Sdes 65238106Sdes/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you 66238106Sdes don't. */ 67238106Sdes#undef HAVE_DECL_NID_SECP384R1 68238106Sdes 69238106Sdes/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 70238106Sdes if you don't. */ 71238106Sdes#undef HAVE_DECL_NID_X9_62_PRIME256V1 72238106Sdes 73291767Sdes/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you 74291767Sdes don't. */ 75291767Sdes#undef HAVE_DECL_REALLOCARRAY 76291767Sdes 77238106Sdes/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 78238106Sdes if you don't. */ 79238106Sdes#undef HAVE_DECL_SK_SSL_COMP_POP_FREE 80238106Sdes 81238106Sdes/* Define to 1 if you have the declaration of 82238106Sdes `SSL_COMP_get_compression_methods', and to 0 if you don't. */ 83238106Sdes#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 84238106Sdes 85291767Sdes/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to 86291767Sdes 0 if you don't. */ 87291767Sdes#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 88291767Sdes 89285206Sdes/* Define to 1 if you have the declaration of `strlcat', and to 0 if you 90285206Sdes don't. */ 91285206Sdes#undef HAVE_DECL_STRLCAT 92285206Sdes 93285206Sdes/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you 94285206Sdes don't. */ 95285206Sdes#undef HAVE_DECL_STRLCPY 96285206Sdes 97238106Sdes/* Define to 1 if you have the <dlfcn.h> header file. */ 98238106Sdes#undef HAVE_DLFCN_H 99238106Sdes 100285206Sdes/* Define to 1 if you have the <endian.h> header file. */ 101285206Sdes#undef HAVE_ENDIAN_H 102285206Sdes 103269257Sdes/* Define to 1 if you have the `endprotoent' function. */ 104269257Sdes#undef HAVE_ENDPROTOENT 105269257Sdes 106269257Sdes/* Define to 1 if you have the `endservent' function. */ 107269257Sdes#undef HAVE_ENDSERVENT 108269257Sdes 109238106Sdes/* Define to 1 if you have the `event_base_free' function. */ 110238106Sdes#undef HAVE_EVENT_BASE_FREE 111238106Sdes 112238106Sdes/* Define to 1 if you have the `event_base_get_method' function. */ 113238106Sdes#undef HAVE_EVENT_BASE_GET_METHOD 114238106Sdes 115238106Sdes/* Define to 1 if you have the `event_base_new' function. */ 116238106Sdes#undef HAVE_EVENT_BASE_NEW 117238106Sdes 118238106Sdes/* Define to 1 if you have the `event_base_once' function. */ 119238106Sdes#undef HAVE_EVENT_BASE_ONCE 120238106Sdes 121238106Sdes/* Define to 1 if you have the <event.h> header file. */ 122238106Sdes#undef HAVE_EVENT_H 123238106Sdes 124238106Sdes/* Define to 1 if you have the `EVP_sha1' function. */ 125238106Sdes#undef HAVE_EVP_SHA1 126238106Sdes 127238106Sdes/* Define to 1 if you have the `EVP_sha256' function. */ 128238106Sdes#undef HAVE_EVP_SHA256 129238106Sdes 130238106Sdes/* Define to 1 if you have the `EVP_sha512' function. */ 131238106Sdes#undef HAVE_EVP_SHA512 132238106Sdes 133238106Sdes/* Define to 1 if you have the `ev_default_loop' function. */ 134238106Sdes#undef HAVE_EV_DEFAULT_LOOP 135238106Sdes 136238106Sdes/* Define to 1 if you have the `ev_loop' function. */ 137238106Sdes#undef HAVE_EV_LOOP 138238106Sdes 139238106Sdes/* Define to 1 if you have the <expat.h> header file. */ 140238106Sdes#undef HAVE_EXPAT_H 141238106Sdes 142238106Sdes/* Define to 1 if you have the `fcntl' function. */ 143238106Sdes#undef HAVE_FCNTL 144238106Sdes 145249141Sdes/* Define to 1 if you have the `FIPS_mode' function. */ 146249141Sdes#undef HAVE_FIPS_MODE 147249141Sdes 148238106Sdes/* Define to 1 if you have the `fork' function. */ 149238106Sdes#undef HAVE_FORK 150238106Sdes 151238106Sdes/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ 152238106Sdes#undef HAVE_FSEEKO 153238106Sdes 154238106Sdes/* Whether getaddrinfo is available */ 155238106Sdes#undef HAVE_GETADDRINFO 156238106Sdes 157285206Sdes/* Define to 1 if you have the `getauxval' function. */ 158285206Sdes#undef HAVE_GETAUXVAL 159285206Sdes 160285206Sdes/* Define to 1 if you have the `getentropy' function. */ 161285206Sdes#undef HAVE_GETENTROPY 162285206Sdes 163238106Sdes/* Define to 1 if you have the <getopt.h> header file. */ 164238106Sdes#undef HAVE_GETOPT_H 165238106Sdes 166238106Sdes/* Define to 1 if you have the `getpwnam' function. */ 167238106Sdes#undef HAVE_GETPWNAM 168238106Sdes 169238106Sdes/* Define to 1 if you have the `getrlimit' function. */ 170238106Sdes#undef HAVE_GETRLIMIT 171238106Sdes 172238106Sdes/* Define to 1 if you have the `glob' function. */ 173238106Sdes#undef HAVE_GLOB 174238106Sdes 175238106Sdes/* Define to 1 if you have the <glob.h> header file. */ 176238106Sdes#undef HAVE_GLOB_H 177238106Sdes 178238106Sdes/* Define to 1 if you have the `gmtime_r' function. */ 179238106Sdes#undef HAVE_GMTIME_R 180238106Sdes 181238106Sdes/* Define to 1 if you have the <grp.h> header file. */ 182238106Sdes#undef HAVE_GRP_H 183238106Sdes 184238106Sdes/* If you have HMAC_CTX_init */ 185238106Sdes#undef HAVE_HMAC_CTX_INIT 186238106Sdes 187238106Sdes/* Define to 1 if you have the `inet_aton' function. */ 188238106Sdes#undef HAVE_INET_ATON 189238106Sdes 190238106Sdes/* Define to 1 if you have the `inet_ntop' function. */ 191238106Sdes#undef HAVE_INET_NTOP 192238106Sdes 193238106Sdes/* Define to 1 if you have the `inet_pton' function. */ 194238106Sdes#undef HAVE_INET_PTON 195238106Sdes 196238106Sdes/* Define to 1 if you have the `initgroups' function. */ 197238106Sdes#undef HAVE_INITGROUPS 198238106Sdes 199238106Sdes/* Define to 1 if you have the <inttypes.h> header file. */ 200238106Sdes#undef HAVE_INTTYPES_H 201238106Sdes 202238106Sdes/* if the function 'ioctlsocket' is available */ 203238106Sdes#undef HAVE_IOCTLSOCKET 204238106Sdes 205238106Sdes/* Define to 1 if you have the <iphlpapi.h> header file. */ 206238106Sdes#undef HAVE_IPHLPAPI_H 207238106Sdes 208238106Sdes/* Define to 1 if you have the `kill' function. */ 209238106Sdes#undef HAVE_KILL 210238106Sdes 211285206Sdes/* Define if we have LibreSSL */ 212285206Sdes#undef HAVE_LIBRESSL 213285206Sdes 214238106Sdes/* Define to 1 if you have the `localtime_r' function. */ 215238106Sdes#undef HAVE_LOCALTIME_R 216238106Sdes 217238106Sdes/* Define to 1 if you have the <login_cap.h> header file. */ 218238106Sdes#undef HAVE_LOGIN_CAP_H 219238106Sdes 220238106Sdes/* If have GNU libc compatible malloc */ 221238106Sdes#undef HAVE_MALLOC 222238106Sdes 223238106Sdes/* Define to 1 if you have the `memmove' function. */ 224238106Sdes#undef HAVE_MEMMOVE 225238106Sdes 226238106Sdes/* Define to 1 if you have the <memory.h> header file. */ 227238106Sdes#undef HAVE_MEMORY_H 228238106Sdes 229238106Sdes/* Define to 1 if you have the <netdb.h> header file. */ 230238106Sdes#undef HAVE_NETDB_H 231238106Sdes 232238106Sdes/* Define to 1 if you have the <netinet/in.h> header file. */ 233238106Sdes#undef HAVE_NETINET_IN_H 234238106Sdes 235249141Sdes/* Use libnss for crypto */ 236249141Sdes#undef HAVE_NSS 237249141Sdes 238238106Sdes/* Define to 1 if you have the `OPENSSL_config' function. */ 239238106Sdes#undef HAVE_OPENSSL_CONFIG 240238106Sdes 241238106Sdes/* Define to 1 if you have the <openssl/conf.h> header file. */ 242238106Sdes#undef HAVE_OPENSSL_CONF_H 243238106Sdes 244238106Sdes/* Define to 1 if you have the <openssl/engine.h> header file. */ 245238106Sdes#undef HAVE_OPENSSL_ENGINE_H 246238106Sdes 247238106Sdes/* Define to 1 if you have the <openssl/err.h> header file. */ 248238106Sdes#undef HAVE_OPENSSL_ERR_H 249238106Sdes 250238106Sdes/* Define to 1 if you have the <openssl/rand.h> header file. */ 251238106Sdes#undef HAVE_OPENSSL_RAND_H 252238106Sdes 253238106Sdes/* Define to 1 if you have the <openssl/ssl.h> header file. */ 254238106Sdes#undef HAVE_OPENSSL_SSL_H 255238106Sdes 256238106Sdes/* Define if you have POSIX threads libraries and header files. */ 257238106Sdes#undef HAVE_PTHREAD 258238106Sdes 259269257Sdes/* Have PTHREAD_PRIO_INHERIT. */ 260269257Sdes#undef HAVE_PTHREAD_PRIO_INHERIT 261269257Sdes 262238106Sdes/* Define to 1 if the system has the type `pthread_rwlock_t'. */ 263238106Sdes#undef HAVE_PTHREAD_RWLOCK_T 264238106Sdes 265238106Sdes/* Define to 1 if the system has the type `pthread_spinlock_t'. */ 266238106Sdes#undef HAVE_PTHREAD_SPINLOCK_T 267238106Sdes 268238106Sdes/* Define to 1 if you have the <pwd.h> header file. */ 269238106Sdes#undef HAVE_PWD_H 270238106Sdes 271238106Sdes/* Define if you have Python libraries and header files. */ 272238106Sdes#undef HAVE_PYTHON 273238106Sdes 274238106Sdes/* Define to 1 if you have the `random' function. */ 275238106Sdes#undef HAVE_RANDOM 276238106Sdes 277291767Sdes/* Define to 1 if you have the `reallocarray' function. */ 278291767Sdes#undef HAVE_REALLOCARRAY 279291767Sdes 280238106Sdes/* Define to 1 if you have the `recvmsg' function. */ 281238106Sdes#undef HAVE_RECVMSG 282238106Sdes 283238106Sdes/* Define to 1 if you have the `sbrk' function. */ 284238106Sdes#undef HAVE_SBRK 285238106Sdes 286238106Sdes/* Define to 1 if you have the `sendmsg' function. */ 287238106Sdes#undef HAVE_SENDMSG 288238106Sdes 289238106Sdes/* Define to 1 if you have the `setregid' function. */ 290238106Sdes#undef HAVE_SETREGID 291238106Sdes 292238106Sdes/* Define to 1 if you have the `setresgid' function. */ 293238106Sdes#undef HAVE_SETRESGID 294238106Sdes 295238106Sdes/* Define to 1 if you have the `setresuid' function. */ 296238106Sdes#undef HAVE_SETRESUID 297238106Sdes 298238106Sdes/* Define to 1 if you have the `setreuid' function. */ 299238106Sdes#undef HAVE_SETREUID 300238106Sdes 301238106Sdes/* Define to 1 if you have the `setrlimit' function. */ 302238106Sdes#undef HAVE_SETRLIMIT 303238106Sdes 304238106Sdes/* Define to 1 if you have the `setsid' function. */ 305238106Sdes#undef HAVE_SETSID 306238106Sdes 307238106Sdes/* Define to 1 if you have the `setusercontext' function. */ 308238106Sdes#undef HAVE_SETUSERCONTEXT 309238106Sdes 310285206Sdes/* Define to 1 if you have the `SHA512_Update' function. */ 311285206Sdes#undef HAVE_SHA512_UPDATE 312285206Sdes 313238106Sdes/* Define to 1 if you have the `sigprocmask' function. */ 314238106Sdes#undef HAVE_SIGPROCMASK 315238106Sdes 316238106Sdes/* Define to 1 if you have the `sleep' function. */ 317238106Sdes#undef HAVE_SLEEP 318238106Sdes 319238106Sdes/* Define to 1 if you have the `snprintf' function. */ 320238106Sdes#undef HAVE_SNPRINTF 321238106Sdes 322238106Sdes/* Define to 1 if you have the `socketpair' function. */ 323238106Sdes#undef HAVE_SOCKETPAIR 324238106Sdes 325238106Sdes/* Using Solaris threads */ 326238106Sdes#undef HAVE_SOLARIS_THREADS 327238106Sdes 328238106Sdes/* Define to 1 if you have the `srandom' function. */ 329238106Sdes#undef HAVE_SRANDOM 330238106Sdes 331238106Sdes/* Define if you have the SSL libraries installed. */ 332238106Sdes#undef HAVE_SSL 333238106Sdes 334238106Sdes/* Define to 1 if you have the <stdarg.h> header file. */ 335238106Sdes#undef HAVE_STDARG_H 336238106Sdes 337238106Sdes/* Define to 1 if you have the <stdbool.h> header file. */ 338238106Sdes#undef HAVE_STDBOOL_H 339238106Sdes 340238106Sdes/* Define to 1 if you have the <stdint.h> header file. */ 341238106Sdes#undef HAVE_STDINT_H 342238106Sdes 343238106Sdes/* Define to 1 if you have the <stdlib.h> header file. */ 344238106Sdes#undef HAVE_STDLIB_H 345238106Sdes 346238106Sdes/* Define to 1 if you have the `strftime' function. */ 347238106Sdes#undef HAVE_STRFTIME 348238106Sdes 349238106Sdes/* Define to 1 if you have the <strings.h> header file. */ 350238106Sdes#undef HAVE_STRINGS_H 351238106Sdes 352238106Sdes/* Define to 1 if you have the <string.h> header file. */ 353238106Sdes#undef HAVE_STRING_H 354238106Sdes 355269257Sdes/* Define to 1 if you have the `strlcat' function. */ 356269257Sdes#undef HAVE_STRLCAT 357269257Sdes 358238106Sdes/* Define to 1 if you have the `strlcpy' function. */ 359238106Sdes#undef HAVE_STRLCPY 360238106Sdes 361238106Sdes/* Define to 1 if you have the `strptime' function. */ 362238106Sdes#undef HAVE_STRPTIME 363238106Sdes 364238106Sdes/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ 365238106Sdes#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 366238106Sdes 367285206Sdes/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ 368285206Sdes#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 369285206Sdes 370238106Sdes/* Define if you have Swig libraries and header files. */ 371238106Sdes#undef HAVE_SWIG 372238106Sdes 373238106Sdes/* Define to 1 if you have the <syslog.h> header file. */ 374238106Sdes#undef HAVE_SYSLOG_H 375238106Sdes 376238106Sdes/* Define to 1 if you have the <sys/param.h> header file. */ 377238106Sdes#undef HAVE_SYS_PARAM_H 378238106Sdes 379238106Sdes/* Define to 1 if you have the <sys/resource.h> header file. */ 380238106Sdes#undef HAVE_SYS_RESOURCE_H 381238106Sdes 382285206Sdes/* Define to 1 if you have the <sys/sha2.h> header file. */ 383285206Sdes#undef HAVE_SYS_SHA2_H 384285206Sdes 385238106Sdes/* Define to 1 if you have the <sys/socket.h> header file. */ 386238106Sdes#undef HAVE_SYS_SOCKET_H 387238106Sdes 388238106Sdes/* Define to 1 if you have the <sys/stat.h> header file. */ 389238106Sdes#undef HAVE_SYS_STAT_H 390238106Sdes 391285206Sdes/* Define to 1 if you have the <sys/sysctl.h> header file. */ 392285206Sdes#undef HAVE_SYS_SYSCTL_H 393285206Sdes 394238106Sdes/* Define to 1 if you have the <sys/types.h> header file. */ 395238106Sdes#undef HAVE_SYS_TYPES_H 396238106Sdes 397238106Sdes/* Define to 1 if you have the <sys/uio.h> header file. */ 398238106Sdes#undef HAVE_SYS_UIO_H 399238106Sdes 400285206Sdes/* Define to 1 if you have the <sys/un.h> header file. */ 401285206Sdes#undef HAVE_SYS_UN_H 402285206Sdes 403238106Sdes/* Define to 1 if you have the <sys/wait.h> header file. */ 404238106Sdes#undef HAVE_SYS_WAIT_H 405238106Sdes 406238106Sdes/* Define to 1 if you have the <time.h> header file. */ 407238106Sdes#undef HAVE_TIME_H 408238106Sdes 409238106Sdes/* Define to 1 if you have the `tzset' function. */ 410238106Sdes#undef HAVE_TZSET 411238106Sdes 412238106Sdes/* Define to 1 if you have the <unistd.h> header file. */ 413238106Sdes#undef HAVE_UNISTD_H 414238106Sdes 415238106Sdes/* Define to 1 if you have the `usleep' function. */ 416238106Sdes#undef HAVE_USLEEP 417238106Sdes 418238106Sdes/* Define to 1 if you have the `vfork' function. */ 419238106Sdes#undef HAVE_VFORK 420238106Sdes 421238106Sdes/* Define to 1 if you have the <vfork.h> header file. */ 422238106Sdes#undef HAVE_VFORK_H 423238106Sdes 424238106Sdes/* Define to 1 if you have the <windows.h> header file. */ 425238106Sdes#undef HAVE_WINDOWS_H 426238106Sdes 427238106Sdes/* Using Windows threads */ 428238106Sdes#undef HAVE_WINDOWS_THREADS 429238106Sdes 430238106Sdes/* Define to 1 if you have the <winsock2.h> header file. */ 431238106Sdes#undef HAVE_WINSOCK2_H 432238106Sdes 433238106Sdes/* Define to 1 if `fork' works. */ 434238106Sdes#undef HAVE_WORKING_FORK 435238106Sdes 436238106Sdes/* Define to 1 if `vfork' works. */ 437238106Sdes#undef HAVE_WORKING_VFORK 438238106Sdes 439238106Sdes/* Define to 1 if you have the `writev' function. */ 440238106Sdes#undef HAVE_WRITEV 441238106Sdes 442238106Sdes/* Define to 1 if you have the <ws2tcpip.h> header file. */ 443238106Sdes#undef HAVE_WS2TCPIP_H 444238106Sdes 445238106Sdes/* Define to 1 if you have the `_beginthreadex' function. */ 446238106Sdes#undef HAVE__BEGINTHREADEX 447238106Sdes 448238106Sdes/* if lex has yylex_destroy */ 449238106Sdes#undef LEX_HAS_YYLEX_DESTROY 450238106Sdes 451238106Sdes/* Define to the sub-directory in which libtool stores uninstalled libraries. 452238106Sdes */ 453238106Sdes#undef LT_OBJDIR 454238106Sdes 455238106Sdes/* Define to the maximum message length to pass to syslog. */ 456238106Sdes#undef MAXSYSLOGMSGLEN 457238106Sdes 458238106Sdes/* Define if memcmp() does not compare unsigned bytes */ 459238106Sdes#undef MEMCMP_IS_BROKEN 460238106Sdes 461238106Sdes/* Define if mkdir has one argument. */ 462238106Sdes#undef MKDIR_HAS_ONE_ARG 463238106Sdes 464238106Sdes/* Define if the network stack does not fully support nonblocking io (causes 465238106Sdes lower performance). */ 466238106Sdes#undef NONBLOCKING_IS_BROKEN 467238106Sdes 468238106Sdes/* Put -D_ALL_SOURCE define in config.h */ 469238106Sdes#undef OMITTED__D_ALL_SOURCE 470238106Sdes 471238106Sdes/* Put -D_BSD_SOURCE define in config.h */ 472238106Sdes#undef OMITTED__D_BSD_SOURCE 473238106Sdes 474238106Sdes/* Put -D_GNU_SOURCE define in config.h */ 475238106Sdes#undef OMITTED__D_GNU_SOURCE 476238106Sdes 477238106Sdes/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ 478238106Sdes#undef OMITTED__D_LARGEFILE_SOURCE_1 479238106Sdes 480238106Sdes/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ 481238106Sdes#undef OMITTED__D_POSIX_C_SOURCE_200112 482238106Sdes 483238106Sdes/* Put -D_XOPEN_SOURCE=600 define in config.h */ 484238106Sdes#undef OMITTED__D_XOPEN_SOURCE_600 485238106Sdes 486238106Sdes/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ 487238106Sdes#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 488238106Sdes 489238106Sdes/* Put -D__EXTENSIONS__ define in config.h */ 490238106Sdes#undef OMITTED__D__EXTENSIONS__ 491238106Sdes 492238106Sdes/* Define to the address where bug reports for this package should be sent. */ 493238106Sdes#undef PACKAGE_BUGREPORT 494238106Sdes 495238106Sdes/* Define to the full name of this package. */ 496238106Sdes#undef PACKAGE_NAME 497238106Sdes 498238106Sdes/* Define to the full name and version of this package. */ 499238106Sdes#undef PACKAGE_STRING 500238106Sdes 501238106Sdes/* Define to the one symbol short name of this package. */ 502238106Sdes#undef PACKAGE_TARNAME 503238106Sdes 504238106Sdes/* Define to the home page for this package. */ 505238106Sdes#undef PACKAGE_URL 506238106Sdes 507238106Sdes/* Define to the version of this package. */ 508238106Sdes#undef PACKAGE_VERSION 509238106Sdes 510238106Sdes/* default pidfile location */ 511238106Sdes#undef PIDFILE 512238106Sdes 513238106Sdes/* Define to necessary symbol if this constant uses a non-standard name on 514238106Sdes your system. */ 515238106Sdes#undef PTHREAD_CREATE_JOINABLE 516238106Sdes 517238106Sdes/* Define as the return type of signal handlers (`int' or `void'). */ 518238106Sdes#undef RETSIGTYPE 519238106Sdes 520238106Sdes/* default rootkey location */ 521238106Sdes#undef ROOT_ANCHOR_FILE 522238106Sdes 523238106Sdes/* default rootcert location */ 524238106Sdes#undef ROOT_CERT_FILE 525238106Sdes 526238106Sdes/* version number for resource files */ 527238106Sdes#undef RSRC_PACKAGE_VERSION 528238106Sdes 529238106Sdes/* Directory to chdir to */ 530238106Sdes#undef RUN_DIR 531238106Sdes 532238106Sdes/* Shared data */ 533238106Sdes#undef SHARE_DIR 534238106Sdes 535269257Sdes/* The size of `time_t', as computed by sizeof. */ 536269257Sdes#undef SIZEOF_TIME_T 537269257Sdes 538238106Sdes/* Define to 1 if you have the ANSI C header files. */ 539238106Sdes#undef STDC_HEADERS 540238106Sdes 541238106Sdes/* use default strptime. */ 542238106Sdes#undef STRPTIME_WORKS 543238106Sdes 544238106Sdes/* Use win32 resources and API */ 545238106Sdes#undef UB_ON_WINDOWS 546238106Sdes 547238106Sdes/* default username */ 548238106Sdes#undef UB_USERNAME 549238106Sdes 550238106Sdes/* use to enable lightweight alloc assertions, for debug use */ 551238106Sdes#undef UNBOUND_ALLOC_LITE 552238106Sdes 553238106Sdes/* use malloc not regions, for debug use */ 554238106Sdes#undef UNBOUND_ALLOC_NONREGIONAL 555238106Sdes 556238106Sdes/* use statistics for allocs and frees, for debug use */ 557238106Sdes#undef UNBOUND_ALLOC_STATS 558238106Sdes 559238106Sdes/* define this to enable debug checks. */ 560238106Sdes#undef UNBOUND_DEBUG 561238106Sdes 562285206Sdes/* Define to 1 to enable dnstap support */ 563285206Sdes#undef USE_DNSTAP 564285206Sdes 565238106Sdes/* Define this to enable ECDSA support. */ 566238106Sdes#undef USE_ECDSA 567238106Sdes 568238106Sdes/* Define this to enable an EVP workaround for older openssl */ 569238106Sdes#undef USE_ECDSA_EVP_WORKAROUND 570238106Sdes 571238106Sdes/* Define this to enable GOST support. */ 572238106Sdes#undef USE_GOST 573238106Sdes 574238106Sdes/* Define if you want to use internal select based events */ 575238106Sdes#undef USE_MINI_EVENT 576238106Sdes 577238106Sdes/* Define this to enable SHA256 and SHA512 support. */ 578238106Sdes#undef USE_SHA2 579238106Sdes 580238106Sdes/* Enable extensions on AIX 3, Interix. */ 581238106Sdes#ifndef _ALL_SOURCE 582238106Sdes# undef _ALL_SOURCE 583238106Sdes#endif 584238106Sdes/* Enable GNU extensions on systems that have them. */ 585238106Sdes#ifndef _GNU_SOURCE 586238106Sdes# undef _GNU_SOURCE 587238106Sdes#endif 588238106Sdes/* Enable threading extensions on Solaris. */ 589238106Sdes#ifndef _POSIX_PTHREAD_SEMANTICS 590238106Sdes# undef _POSIX_PTHREAD_SEMANTICS 591238106Sdes#endif 592238106Sdes/* Enable extensions on HP NonStop. */ 593238106Sdes#ifndef _TANDEM_SOURCE 594238106Sdes# undef _TANDEM_SOURCE 595238106Sdes#endif 596238106Sdes/* Enable general extensions on Solaris. */ 597238106Sdes#ifndef __EXTENSIONS__ 598238106Sdes# undef __EXTENSIONS__ 599238106Sdes#endif 600238106Sdes 601238106Sdes 602238106Sdes/* Whether the windows socket API is used */ 603238106Sdes#undef USE_WINSOCK 604238106Sdes 605238106Sdes/* the version of the windows API enabled */ 606238106Sdes#undef WINVER 607238106Sdes 608238106Sdes/* Define if you want Python module. */ 609238106Sdes#undef WITH_PYTHONMODULE 610238106Sdes 611238106Sdes/* Define if you want PyUnbound. */ 612238106Sdes#undef WITH_PYUNBOUND 613238106Sdes 614238106Sdes/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a 615238106Sdes `char[]'. */ 616238106Sdes#undef YYTEXT_POINTER 617238106Sdes 618249141Sdes/* Enable large inode numbers on Mac OS X 10.5. */ 619249141Sdes#ifndef _DARWIN_USE_64_BIT_INODE 620249141Sdes# define _DARWIN_USE_64_BIT_INODE 1 621249141Sdes#endif 622249141Sdes 623238106Sdes/* Number of bits in a file offset, on hosts where this is settable. */ 624238106Sdes#undef _FILE_OFFSET_BITS 625238106Sdes 626238106Sdes/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 627238106Sdes#undef _LARGEFILE_SOURCE 628238106Sdes 629238106Sdes/* Define for large files, on AIX-style hosts. */ 630238106Sdes#undef _LARGE_FILES 631238106Sdes 632238106Sdes/* Define to 1 if on MINIX. */ 633238106Sdes#undef _MINIX 634238106Sdes 635269257Sdes/* Enable for compile on Minix */ 636269257Sdes#undef _NETBSD_SOURCE 637269257Sdes 638238106Sdes/* Define to 2 if the system does not provide POSIX.1 features except with 639238106Sdes this defined. */ 640238106Sdes#undef _POSIX_1_SOURCE 641238106Sdes 642238106Sdes/* Define to 1 if you need to in order for `stat' and other things to work. */ 643238106Sdes#undef _POSIX_SOURCE 644238106Sdes 645238106Sdes/* Define to empty if `const' does not conform to ANSI C. */ 646238106Sdes#undef const 647238106Sdes 648238106Sdes/* Define to `int' if <sys/types.h> doesn't define. */ 649238106Sdes#undef gid_t 650238106Sdes 651238106Sdes/* in_addr_t */ 652238106Sdes#undef in_addr_t 653238106Sdes 654238106Sdes/* in_port_t */ 655238106Sdes#undef in_port_t 656238106Sdes 657238106Sdes/* Define to `__inline__' or `__inline' if that's what the C compiler 658238106Sdes calls it, or to nothing if 'inline' is not supported under any name. */ 659238106Sdes#ifndef __cplusplus 660238106Sdes#undef inline 661238106Sdes#endif 662238106Sdes 663238106Sdes/* Define to `short' if <sys/types.h> does not define. */ 664238106Sdes#undef int16_t 665238106Sdes 666238106Sdes/* Define to `int' if <sys/types.h> does not define. */ 667238106Sdes#undef int32_t 668238106Sdes 669238106Sdes/* Define to `long long' if <sys/types.h> does not define. */ 670238106Sdes#undef int64_t 671238106Sdes 672238106Sdes/* Define to `signed char' if <sys/types.h> does not define. */ 673238106Sdes#undef int8_t 674238106Sdes 675238106Sdes/* Define if replacement function should be used. */ 676238106Sdes#undef malloc 677238106Sdes 678238106Sdes/* Define to `long int' if <sys/types.h> does not define. */ 679238106Sdes#undef off_t 680238106Sdes 681238106Sdes/* Define to `int' if <sys/types.h> does not define. */ 682238106Sdes#undef pid_t 683238106Sdes 684238106Sdes/* Define to 'int' if not defined */ 685238106Sdes#undef rlim_t 686238106Sdes 687238106Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */ 688238106Sdes#undef size_t 689238106Sdes 690238106Sdes/* Define to 'int' if not defined */ 691238106Sdes#undef socklen_t 692238106Sdes 693238106Sdes/* Define to `int' if <sys/types.h> does not define. */ 694238106Sdes#undef ssize_t 695238106Sdes 696238106Sdes/* Define to 'unsigned char if not defined */ 697238106Sdes#undef u_char 698238106Sdes 699238106Sdes/* Define to `int' if <sys/types.h> doesn't define. */ 700238106Sdes#undef uid_t 701238106Sdes 702238106Sdes/* Define to `unsigned short' if <sys/types.h> does not define. */ 703238106Sdes#undef uint16_t 704238106Sdes 705238106Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */ 706238106Sdes#undef uint32_t 707238106Sdes 708238106Sdes/* Define to `unsigned long long' if <sys/types.h> does not define. */ 709238106Sdes#undef uint64_t 710238106Sdes 711238106Sdes/* Define to `unsigned char' if <sys/types.h> does not define. */ 712238106Sdes#undef uint8_t 713238106Sdes 714238106Sdes/* Define as `fork' if `vfork' does not work. */ 715238106Sdes#undef vfork 716238106Sdes 717238106Sdes#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE) 718238106Sdes#define _GNU_SOURCE 1 719238106Sdes#endif 720238106Sdes 721238106Sdes#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE) 722238106Sdes#define _BSD_SOURCE 1 723238106Sdes#endif 724238106Sdes 725238106Sdes#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__) 726238106Sdes#define __EXTENSIONS__ 1 727238106Sdes#endif 728238106Sdes 729238106Sdes#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE) 730238106Sdes#define _POSIX_C_SOURCE 200112 731238106Sdes#endif 732238106Sdes 733238106Sdes#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE) 734238106Sdes#define _XOPEN_SOURCE 600 735238106Sdes#endif 736238106Sdes 737238106Sdes#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED) 738238106Sdes#define _XOPEN_SOURCE_EXTENDED 1 739238106Sdes#endif 740238106Sdes 741238106Sdes#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE) 742238106Sdes#define _ALL_SOURCE 1 743238106Sdes#endif 744238106Sdes 745238106Sdes#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE) 746238106Sdes#define _LARGEFILE_SOURCE 1 747238106Sdes#endif 748238106Sdes 749238106Sdes 750238106Sdes 751238106Sdes 752238106Sdes#ifndef UNBOUND_DEBUG 753238106Sdes# define NDEBUG 754238106Sdes#endif 755238106Sdes 756269257Sdes/** Use small-ldns codebase */ 757269257Sdes#define USE_SLDNS 1 758269257Sdes#ifdef HAVE_SSL 759269257Sdes# define LDNS_BUILD_CONFIG_HAVE_SSL 1 760269257Sdes#endif 761269257Sdes 762238106Sdes#include <stdio.h> 763238106Sdes#include <string.h> 764238106Sdes#include <unistd.h> 765238106Sdes#include <assert.h> 766238106Sdes 767238106Sdes#if STDC_HEADERS 768238106Sdes#include <stdlib.h> 769238106Sdes#include <stddef.h> 770238106Sdes#endif 771238106Sdes 772269257Sdes#ifdef HAVE_STDARG_H 773269257Sdes#include <stdarg.h> 774269257Sdes#endif 775269257Sdes 776238106Sdes#ifdef HAVE_STDINT_H 777238106Sdes#include <stdint.h> 778238106Sdes#endif 779238106Sdes 780238106Sdes#include <errno.h> 781238106Sdes 782238106Sdes#if HAVE_SYS_PARAM_H 783238106Sdes#include <sys/param.h> 784238106Sdes#endif 785238106Sdes 786238106Sdes#ifdef HAVE_SYS_SOCKET_H 787238106Sdes#include <sys/socket.h> 788238106Sdes#endif 789238106Sdes 790238106Sdes#ifdef HAVE_SYS_UIO_H 791238106Sdes#include <sys/uio.h> 792238106Sdes#endif 793238106Sdes 794238106Sdes#ifdef HAVE_NETINET_IN_H 795238106Sdes#include <netinet/in.h> 796238106Sdes#endif 797238106Sdes 798238106Sdes#ifdef HAVE_ARPA_INET_H 799238106Sdes#include <arpa/inet.h> 800238106Sdes#endif 801238106Sdes 802238106Sdes#ifdef HAVE_WINSOCK2_H 803238106Sdes#include <winsock2.h> 804238106Sdes#endif 805238106Sdes 806238106Sdes#ifdef HAVE_WS2TCPIP_H 807238106Sdes#include <ws2tcpip.h> 808238106Sdes#endif 809238106Sdes 810269257Sdes#ifndef USE_WINSOCK 811269257Sdes#define ARG_LL "%ll" 812269257Sdes#else 813269257Sdes#define ARG_LL "%I64" 814269257Sdes#endif 815238106Sdes 816285206Sdes#ifndef AF_LOCAL 817285206Sdes#define AF_LOCAL AF_UNIX 818285206Sdes#endif 819269257Sdes 820285206Sdes 821238106Sdes 822238106Sdes#ifdef HAVE_ATTR_FORMAT 823238106Sdes# define ATTR_FORMAT(archetype, string_index, first_to_check) \ 824238106Sdes __attribute__ ((format (archetype, string_index, first_to_check))) 825238106Sdes#else /* !HAVE_ATTR_FORMAT */ 826238106Sdes# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ 827238106Sdes#endif /* !HAVE_ATTR_FORMAT */ 828238106Sdes 829238106Sdes 830238106Sdes#if defined(DOXYGEN) 831238106Sdes# define ATTR_UNUSED(x) x 832238106Sdes#elif defined(__cplusplus) 833238106Sdes# define ATTR_UNUSED(x) 834238106Sdes#elif defined(HAVE_ATTR_UNUSED) 835238106Sdes# define ATTR_UNUSED(x) x __attribute__((unused)) 836238106Sdes#else /* !HAVE_ATTR_UNUSED */ 837238106Sdes# define ATTR_UNUSED(x) x 838238106Sdes#endif /* !HAVE_ATTR_UNUSED */ 839238106Sdes 840238106Sdes 841238106Sdes#ifndef HAVE_FSEEKO 842238106Sdes#define fseeko fseek 843238106Sdes#define ftello ftell 844238106Sdes#endif /* HAVE_FSEEKO */ 845238106Sdes 846238106Sdes 847238106Sdes#ifndef MAXHOSTNAMELEN 848238106Sdes#define MAXHOSTNAMELEN 256 849238106Sdes#endif 850238106Sdes 851238106Sdes 852238106Sdes#ifndef HAVE_SNPRINTF 853238106Sdes#define snprintf snprintf_unbound 854238106Sdes#define vsnprintf vsnprintf_unbound 855238106Sdes#include <stdarg.h> 856238106Sdesint snprintf (char *str, size_t count, const char *fmt, ...); 857238106Sdesint vsnprintf (char *str, size_t count, const char *fmt, va_list arg); 858238106Sdes#endif /* HAVE_SNPRINTF */ 859238106Sdes 860238106Sdes 861238106Sdes#ifndef HAVE_INET_PTON 862238106Sdes#define inet_pton inet_pton_unbound 863238106Sdesint inet_pton(int af, const char* src, void* dst); 864238106Sdes#endif /* HAVE_INET_PTON */ 865238106Sdes 866238106Sdes 867238106Sdes#ifndef HAVE_INET_NTOP 868238106Sdes#define inet_ntop inet_ntop_unbound 869238106Sdesconst char *inet_ntop(int af, const void *src, char *dst, size_t size); 870238106Sdes#endif 871238106Sdes 872238106Sdes 873238106Sdes#ifndef HAVE_INET_ATON 874238106Sdes#define inet_aton inet_aton_unbound 875238106Sdesint inet_aton(const char *cp, struct in_addr *addr); 876238106Sdes#endif 877238106Sdes 878238106Sdes 879238106Sdes#ifndef HAVE_MEMMOVE 880238106Sdes#define memmove memmove_unbound 881238106Sdesvoid *memmove(void *dest, const void *src, size_t n); 882238106Sdes#endif 883238106Sdes 884238106Sdes 885269257Sdes#ifndef HAVE_STRLCAT 886269257Sdes#define strlcat strlcat_unbound 887269257Sdessize_t strlcat(char *dst, const char *src, size_t siz); 888269257Sdes#endif 889269257Sdes 890269257Sdes 891238106Sdes#ifndef HAVE_STRLCPY 892238106Sdes#define strlcpy strlcpy_unbound 893238106Sdessize_t strlcpy(char *dst, const char *src, size_t siz); 894238106Sdes#endif 895238106Sdes 896238106Sdes 897238106Sdes#ifndef HAVE_GMTIME_R 898238106Sdes#define gmtime_r gmtime_r_unbound 899238106Sdesstruct tm *gmtime_r(const time_t *timep, struct tm *result); 900238106Sdes#endif 901238106Sdes 902238106Sdes 903291767Sdes#ifndef HAVE_REALLOCARRAY 904291767Sdes#define reallocarray reallocarrayunbound 905291767Sdesvoid* reallocarray(void *ptr, size_t nmemb, size_t size); 906291767Sdes#endif 907291767Sdes 908291767Sdes 909269257Sdes#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H) 910238106Sdes#define sleep(x) Sleep((x)*1000) /* on win32 */ 911238106Sdes#endif /* HAVE_SLEEP */ 912238106Sdes 913238106Sdes 914238106Sdes#ifndef HAVE_USLEEP 915238106Sdes#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */ 916238106Sdes#endif /* HAVE_USLEEP */ 917238106Sdes 918238106Sdes 919238106Sdes#ifndef HAVE_RANDOM 920238106Sdes#define random rand /* on win32, for tests only (bad random) */ 921238106Sdes#endif /* HAVE_RANDOM */ 922238106Sdes 923238106Sdes 924238106Sdes#ifndef HAVE_SRANDOM 925238106Sdes#define srandom(x) srand(x) /* on win32, for tests only (bad random) */ 926238106Sdes#endif /* HAVE_SRANDOM */ 927238106Sdes 928238106Sdes 929238106Sdes/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */ 930238106Sdes#ifdef HAVE_WINSOCK2_H 931238106Sdes#define FD_SET_T (u_int) 932238106Sdes#else 933238106Sdes#define FD_SET_T 934238106Sdes#endif 935238106Sdes 936238106Sdes 937238106Sdes#ifndef IPV6_MIN_MTU 938238106Sdes#define IPV6_MIN_MTU 1280 939238106Sdes#endif /* IPV6_MIN_MTU */ 940238106Sdes 941238106Sdes 942238106Sdes#ifdef MEMCMP_IS_BROKEN 943238106Sdes#include "compat/memcmp.h" 944238106Sdes#define memcmp memcmp_unbound 945238106Sdesint memcmp(const void *x, const void *y, size_t n); 946238106Sdes#endif 947238106Sdes 948238106Sdes 949238106Sdes 950238106Sdes#ifndef HAVE_CTIME_R 951238106Sdes#define ctime_r unbound_ctime_r 952238106Sdeschar *ctime_r(const time_t *timep, char *buf); 953238106Sdes#endif 954238106Sdes 955238106Sdes#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) 956238106Sdes#define strptime unbound_strptime 957238106Sdesstruct tm; 958238106Sdeschar *strptime(const char *s, const char *format, struct tm *tm); 959238106Sdes#endif 960238106Sdes 961285206Sdes#ifdef HAVE_LIBRESSL 962285206Sdes# if !HAVE_DECL_STRLCPY 963285206Sdessize_t strlcpy(char *dst, const char *src, size_t siz); 964285206Sdes# endif 965285206Sdes# if !HAVE_DECL_STRLCAT 966285206Sdessize_t strlcat(char *dst, const char *src, size_t siz); 967285206Sdes# endif 968285206Sdes# if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM) 969285206Sdesuint32_t arc4random(void); 970285206Sdes# endif 971285206Sdes# if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM) 972285206Sdesuint32_t arc4random_uniform(uint32_t upper_bound); 973285206Sdes# endif 974291767Sdes# if !HAVE_DECL_REALLOCARRAY 975291767Sdesvoid *reallocarray(void *ptr, size_t nmemb, size_t size); 976291767Sdes# endif 977285206Sdes#endif /* HAVE_LIBRESSL */ 978285206Sdes#ifndef HAVE_ARC4RANDOM 979285206Sdesvoid explicit_bzero(void* buf, size_t len); 980285206Sdesint getentropy(void* buf, size_t len); 981285206Sdesuint32_t arc4random(void); 982285206Sdesvoid arc4random_buf(void* buf, size_t n); 983285206Sdesvoid _ARC4_LOCK(void); 984285206Sdesvoid _ARC4_UNLOCK(void); 985285206Sdes#endif 986285206Sdes#ifndef HAVE_ARC4RANDOM_UNIFORM 987285206Sdesuint32_t arc4random_uniform(uint32_t upper_bound); 988285206Sdes#endif 989285206Sdes#ifdef COMPAT_SHA512 990285206Sdes#ifndef SHA512_DIGEST_LENGTH 991285206Sdes#define SHA512_BLOCK_LENGTH 128 992285206Sdes#define SHA512_DIGEST_LENGTH 64 993285206Sdes#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) 994285206Sdestypedef struct _SHA512_CTX { 995285206Sdes uint64_t state[8]; 996285206Sdes uint64_t bitcount[2]; 997285206Sdes uint8_t buffer[SHA512_BLOCK_LENGTH]; 998285206Sdes} SHA512_CTX; 999285206Sdes#endif /* SHA512_DIGEST_LENGTH */ 1000285206Sdesvoid SHA512_Init(SHA512_CTX*); 1001285206Sdesvoid SHA512_Update(SHA512_CTX*, void*, size_t); 1002285206Sdesvoid SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*); 1003285206Sdesunsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest); 1004285206Sdes#endif /* COMPAT_SHA512 */ 1005285206Sdes 1006285206Sdes 1007285206Sdes 1008238106Sdes#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)) 1009238106Sdes /* using version of libevent that is not threadsafe. */ 1010238106Sdes# define LIBEVENT_SIGNAL_PROBLEM 1 1011238106Sdes#endif 1012238106Sdes 1013238106Sdes#ifndef CHECKED_INET6 1014238106Sdes# define CHECKED_INET6 1015238106Sdes# ifdef AF_INET6 1016238106Sdes# define INET6 1017238106Sdes# else 1018238106Sdes# define AF_INET6 28 1019238106Sdes# endif 1020238106Sdes#endif /* CHECKED_INET6 */ 1021238106Sdes 1022238106Sdes#ifndef HAVE_GETADDRINFO 1023238106Sdesstruct sockaddr_storage; 1024238106Sdes#include "compat/fake-rfc2553.h" 1025238106Sdes#endif 1026238106Sdes 1027238106Sdes#ifdef UNBOUND_ALLOC_STATS 1028238106Sdes# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__) 1029238106Sdes# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__) 1030238106Sdes# define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__) 1031238106Sdes# define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__) 1032238106Sdesvoid *unbound_stat_malloc(size_t size); 1033238106Sdesvoid *unbound_stat_calloc(size_t nmemb, size_t size); 1034238106Sdesvoid unbound_stat_free(void *ptr); 1035238106Sdesvoid *unbound_stat_realloc(void *ptr, size_t size); 1036238106Sdesvoid *unbound_stat_malloc_log(size_t size, const char* file, int line, 1037238106Sdes const char* func); 1038238106Sdesvoid *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file, 1039238106Sdes int line, const char* func); 1040238106Sdesvoid unbound_stat_free_log(void *ptr, const char* file, int line, 1041238106Sdes const char* func); 1042238106Sdesvoid *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, 1043238106Sdes int line, const char* func); 1044238106Sdes#elif defined(UNBOUND_ALLOC_LITE) 1045238106Sdes# include "util/alloc.h" 1046238106Sdes#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */ 1047238106Sdes 1048238106Sdes/** default port for DNS traffic. */ 1049238106Sdes#define UNBOUND_DNS_PORT 53 1050238106Sdes/** default port for unbound control traffic, registered port with IANA, 1051238106Sdes ub-dns-control 8953/tcp unbound dns nameserver control */ 1052238106Sdes#define UNBOUND_CONTROL_PORT 8953 1053238106Sdes/** the version of unbound-control that this software implements */ 1054238106Sdes#define UNBOUND_CONTROL_VERSION 1 1055238106Sdes 1056238106Sdes 1057