config.h revision 276699
1255581Sdes/* config.h. Generated from config.h.in by configure. */ 2255581Sdes/* config.h.in. Generated from configure.ac by autoheader. */ 3255581Sdes 4255581Sdes/* Directory to chroot to */ 5255581Sdes#define CHROOT_DIR "/var/unbound" 6255581Sdes 7276605Sdes/* Do sha512 definitions in config.h */ 8276605Sdes/* #undef COMPAT_SHA512 */ 9276605Sdes 10255581Sdes/* Pathname to the Unbound configuration file */ 11255840Sdes#define CONFIGFILE "/var/unbound/unbound.conf" 12255581Sdes 13255581Sdes/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work 14255581Sdes */ 15255581Sdes/* #undef DARWIN_BROKEN_SETREUID */ 16255581Sdes 17255581Sdes/* Whether daemon is deprecated */ 18255581Sdes/* #undef DEPRECATED_DAEMON */ 19255581Sdes 20276605Sdes/* default dnstap socket path */ 21276605Sdes/* #undef DNSTAP_SOCKET_PATH */ 22276605Sdes 23255581Sdes/* Define if you want to use debug lock checking (slow). */ 24255581Sdes/* #undef ENABLE_LOCK_CHECKS */ 25255581Sdes 26255581Sdes/* Define this if you enabled-allsymbols from libunbound to link binaries to 27255581Sdes it for smaller install size, but the libunbound export table is polluted by 28255581Sdes internal symbols */ 29255581Sdes/* #undef EXPORT_ALL_SYMBOLS */ 30255581Sdes 31276605Sdes/* Define to 1 if you have the `arc4random' function. */ 32276605Sdes#define HAVE_ARC4RANDOM 1 33276605Sdes 34276605Sdes/* Define to 1 if you have the `arc4random_uniform' function. */ 35276605Sdes#define HAVE_ARC4RANDOM_UNIFORM 1 36276605Sdes 37255581Sdes/* Define to 1 if you have the <arpa/inet.h> header file. */ 38255581Sdes#define HAVE_ARPA_INET_H 1 39255581Sdes 40255581Sdes/* Whether the C compiler accepts the "format" attribute */ 41255581Sdes#define HAVE_ATTR_FORMAT 1 42255581Sdes 43255581Sdes/* Whether the C compiler accepts the "unused" attribute */ 44255581Sdes#define HAVE_ATTR_UNUSED 1 45255581Sdes 46255581Sdes/* Define to 1 if your system has a working `chown' function. */ 47255581Sdes#define HAVE_CHOWN 1 48255581Sdes 49255581Sdes/* Define to 1 if you have the `chroot' function. */ 50255581Sdes#define HAVE_CHROOT 1 51255581Sdes 52255581Sdes/* Define to 1 if you have the `ctime_r' function. */ 53255581Sdes#define HAVE_CTIME_R 1 54255581Sdes 55255581Sdes/* Define to 1 if you have the `daemon' function. */ 56255581Sdes#define HAVE_DAEMON 1 57255581Sdes 58276605Sdes/* Define to 1 if you have the declaration of `arc4random', and to 0 if you 59276605Sdes don't. */ 60276605Sdes/* #undef HAVE_DECL_ARC4RANDOM */ 61276605Sdes 62276605Sdes/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0 63276605Sdes if you don't. */ 64276605Sdes/* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */ 65276605Sdes 66255581Sdes/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you 67255581Sdes don't. */ 68255581Sdes#define HAVE_DECL_NID_SECP384R1 1 69255581Sdes 70255581Sdes/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 71255581Sdes if you don't. */ 72255581Sdes#define HAVE_DECL_NID_X9_62_PRIME256V1 1 73255581Sdes 74255581Sdes/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 75255581Sdes if you don't. */ 76255581Sdes#define HAVE_DECL_SK_SSL_COMP_POP_FREE 1 77255581Sdes 78255581Sdes/* Define to 1 if you have the declaration of 79255581Sdes `SSL_COMP_get_compression_methods', and to 0 if you don't. */ 80255581Sdes#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1 81255581Sdes 82276605Sdes/* Define to 1 if you have the declaration of `strlcat', and to 0 if you 83276605Sdes don't. */ 84276605Sdes/* #undef HAVE_DECL_STRLCAT */ 85276605Sdes 86276605Sdes/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you 87276605Sdes don't. */ 88276605Sdes/* #undef HAVE_DECL_STRLCPY */ 89276605Sdes 90255581Sdes/* Define to 1 if you have the <dlfcn.h> header file. */ 91255581Sdes#define HAVE_DLFCN_H 1 92255581Sdes 93276605Sdes/* Define to 1 if you have the <endian.h> header file. */ 94276605Sdes/* #undef HAVE_ENDIAN_H */ 95276605Sdes 96266114Sdes/* Define to 1 if you have the `endprotoent' function. */ 97266114Sdes#define HAVE_ENDPROTOENT 1 98266114Sdes 99266114Sdes/* Define to 1 if you have the `endservent' function. */ 100266114Sdes#define HAVE_ENDSERVENT 1 101266114Sdes 102255581Sdes/* Define to 1 if you have the `event_base_free' function. */ 103255581Sdes/* #undef HAVE_EVENT_BASE_FREE */ 104255581Sdes 105255581Sdes/* Define to 1 if you have the `event_base_get_method' function. */ 106255581Sdes/* #undef HAVE_EVENT_BASE_GET_METHOD */ 107255581Sdes 108255581Sdes/* Define to 1 if you have the `event_base_new' function. */ 109255581Sdes/* #undef HAVE_EVENT_BASE_NEW */ 110255581Sdes 111255581Sdes/* Define to 1 if you have the `event_base_once' function. */ 112255581Sdes/* #undef HAVE_EVENT_BASE_ONCE */ 113255581Sdes 114255581Sdes/* Define to 1 if you have the <event.h> header file. */ 115255581Sdes/* #undef HAVE_EVENT_H */ 116255581Sdes 117255581Sdes/* Define to 1 if you have the `EVP_sha1' function. */ 118255581Sdes#define HAVE_EVP_SHA1 1 119255581Sdes 120255581Sdes/* Define to 1 if you have the `EVP_sha256' function. */ 121255581Sdes#define HAVE_EVP_SHA256 1 122255581Sdes 123255581Sdes/* Define to 1 if you have the `EVP_sha512' function. */ 124255581Sdes#define HAVE_EVP_SHA512 1 125255581Sdes 126255581Sdes/* Define to 1 if you have the `ev_default_loop' function. */ 127255581Sdes/* #undef HAVE_EV_DEFAULT_LOOP */ 128255581Sdes 129255581Sdes/* Define to 1 if you have the `ev_loop' function. */ 130255581Sdes/* #undef HAVE_EV_LOOP */ 131255581Sdes 132255581Sdes/* Define to 1 if you have the <expat.h> header file. */ 133255581Sdes#define HAVE_EXPAT_H 1 134255581Sdes 135255581Sdes/* Define to 1 if you have the `fcntl' function. */ 136255581Sdes#define HAVE_FCNTL 1 137255581Sdes 138255581Sdes/* Define to 1 if you have the `FIPS_mode' function. */ 139255581Sdes#define HAVE_FIPS_MODE 1 140255581Sdes 141255581Sdes/* Define to 1 if you have the `fork' function. */ 142255581Sdes#define HAVE_FORK 1 143255581Sdes 144255581Sdes/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ 145255581Sdes#define HAVE_FSEEKO 1 146255581Sdes 147255581Sdes/* Whether getaddrinfo is available */ 148255581Sdes#define HAVE_GETADDRINFO 1 149255581Sdes 150276605Sdes/* Define to 1 if you have the `getentropy' function. */ 151276605Sdes/* #undef HAVE_GETENTROPY */ 152276605Sdes 153255581Sdes/* Define to 1 if you have the <getopt.h> header file. */ 154255581Sdes#define HAVE_GETOPT_H 1 155255581Sdes 156255581Sdes/* Define to 1 if you have the `getpwnam' function. */ 157255581Sdes#define HAVE_GETPWNAM 1 158255581Sdes 159255581Sdes/* Define to 1 if you have the `getrlimit' function. */ 160255581Sdes#define HAVE_GETRLIMIT 1 161255581Sdes 162255581Sdes/* Define to 1 if you have the `glob' function. */ 163255581Sdes#define HAVE_GLOB 1 164255581Sdes 165255581Sdes/* Define to 1 if you have the <glob.h> header file. */ 166255581Sdes#define HAVE_GLOB_H 1 167255581Sdes 168255581Sdes/* Define to 1 if you have the `gmtime_r' function. */ 169255581Sdes#define HAVE_GMTIME_R 1 170255581Sdes 171255581Sdes/* Define to 1 if you have the <grp.h> header file. */ 172255581Sdes#define HAVE_GRP_H 1 173255581Sdes 174255581Sdes/* If you have HMAC_CTX_init */ 175255581Sdes#define HAVE_HMAC_CTX_INIT 1 176255581Sdes 177255581Sdes/* Define to 1 if you have the `inet_aton' function. */ 178255581Sdes#define HAVE_INET_ATON 1 179255581Sdes 180255581Sdes/* Define to 1 if you have the `inet_ntop' function. */ 181255581Sdes#define HAVE_INET_NTOP 1 182255581Sdes 183255581Sdes/* Define to 1 if you have the `inet_pton' function. */ 184255581Sdes#define HAVE_INET_PTON 1 185255581Sdes 186255581Sdes/* Define to 1 if you have the `initgroups' function. */ 187255581Sdes#define HAVE_INITGROUPS 1 188255581Sdes 189255581Sdes/* Define to 1 if you have the <inttypes.h> header file. */ 190255581Sdes#define HAVE_INTTYPES_H 1 191255581Sdes 192255581Sdes/* if the function 'ioctlsocket' is available */ 193255581Sdes/* #undef HAVE_IOCTLSOCKET */ 194255581Sdes 195255581Sdes/* Define to 1 if you have the <iphlpapi.h> header file. */ 196255581Sdes/* #undef HAVE_IPHLPAPI_H */ 197255581Sdes 198255581Sdes/* Define to 1 if you have the `kill' function. */ 199255581Sdes#define HAVE_KILL 1 200255581Sdes 201276605Sdes/* Define if we have LibreSSL */ 202276605Sdes/* #undef HAVE_LIBRESSL */ 203276605Sdes 204255581Sdes/* Define to 1 if you have the `localtime_r' function. */ 205255581Sdes#define HAVE_LOCALTIME_R 1 206255581Sdes 207255581Sdes/* Define to 1 if you have the <login_cap.h> header file. */ 208255581Sdes#define HAVE_LOGIN_CAP_H 1 209255581Sdes 210255581Sdes/* If have GNU libc compatible malloc */ 211255581Sdes#define HAVE_MALLOC 1 212255581Sdes 213255581Sdes/* Define to 1 if you have the `memmove' function. */ 214255581Sdes#define HAVE_MEMMOVE 1 215255581Sdes 216255581Sdes/* Define to 1 if you have the <memory.h> header file. */ 217255581Sdes#define HAVE_MEMORY_H 1 218255581Sdes 219255581Sdes/* Define to 1 if you have the <netdb.h> header file. */ 220255581Sdes#define HAVE_NETDB_H 1 221255581Sdes 222255581Sdes/* Define to 1 if you have the <netinet/in.h> header file. */ 223255581Sdes#define HAVE_NETINET_IN_H 1 224255581Sdes 225255581Sdes/* Use libnss for crypto */ 226255581Sdes/* #undef HAVE_NSS */ 227255581Sdes 228255581Sdes/* Define to 1 if you have the `OPENSSL_config' function. */ 229255581Sdes#define HAVE_OPENSSL_CONFIG 1 230255581Sdes 231255581Sdes/* Define to 1 if you have the <openssl/conf.h> header file. */ 232255581Sdes#define HAVE_OPENSSL_CONF_H 1 233255581Sdes 234255581Sdes/* Define to 1 if you have the <openssl/engine.h> header file. */ 235255581Sdes#define HAVE_OPENSSL_ENGINE_H 1 236255581Sdes 237255581Sdes/* Define to 1 if you have the <openssl/err.h> header file. */ 238255581Sdes#define HAVE_OPENSSL_ERR_H 1 239255581Sdes 240255581Sdes/* Define to 1 if you have the <openssl/rand.h> header file. */ 241255581Sdes#define HAVE_OPENSSL_RAND_H 1 242255581Sdes 243255581Sdes/* Define to 1 if you have the <openssl/ssl.h> header file. */ 244255581Sdes#define HAVE_OPENSSL_SSL_H 1 245255581Sdes 246255581Sdes/* Define if you have POSIX threads libraries and header files. */ 247255581Sdes#define HAVE_PTHREAD 1 248255581Sdes 249266114Sdes/* Have PTHREAD_PRIO_INHERIT. */ 250266114Sdes#define HAVE_PTHREAD_PRIO_INHERIT 1 251266114Sdes 252255581Sdes/* Define to 1 if the system has the type `pthread_rwlock_t'. */ 253255581Sdes#define HAVE_PTHREAD_RWLOCK_T 1 254255581Sdes 255255581Sdes/* Define to 1 if the system has the type `pthread_spinlock_t'. */ 256255581Sdes#define HAVE_PTHREAD_SPINLOCK_T 1 257255581Sdes 258255581Sdes/* Define to 1 if you have the <pwd.h> header file. */ 259255581Sdes#define HAVE_PWD_H 1 260255581Sdes 261255581Sdes/* Define if you have Python libraries and header files. */ 262255581Sdes/* #undef HAVE_PYTHON */ 263255581Sdes 264255581Sdes/* Define to 1 if you have the `random' function. */ 265255581Sdes#define HAVE_RANDOM 1 266255581Sdes 267255581Sdes/* Define to 1 if you have the `recvmsg' function. */ 268255581Sdes#define HAVE_RECVMSG 1 269255581Sdes 270255581Sdes/* Define to 1 if you have the `sbrk' function. */ 271266114Sdes/* #undef HAVE_SBRK */ 272255581Sdes 273255581Sdes/* Define to 1 if you have the `sendmsg' function. */ 274255581Sdes#define HAVE_SENDMSG 1 275255581Sdes 276255581Sdes/* Define to 1 if you have the `setregid' function. */ 277255581Sdes/* #undef HAVE_SETREGID */ 278255581Sdes 279255581Sdes/* Define to 1 if you have the `setresgid' function. */ 280255581Sdes#define HAVE_SETRESGID 1 281255581Sdes 282255581Sdes/* Define to 1 if you have the `setresuid' function. */ 283255581Sdes#define HAVE_SETRESUID 1 284255581Sdes 285255581Sdes/* Define to 1 if you have the `setreuid' function. */ 286255581Sdes/* #undef HAVE_SETREUID */ 287255581Sdes 288255581Sdes/* Define to 1 if you have the `setrlimit' function. */ 289255581Sdes#define HAVE_SETRLIMIT 1 290255581Sdes 291255581Sdes/* Define to 1 if you have the `setsid' function. */ 292255581Sdes#define HAVE_SETSID 1 293255581Sdes 294255581Sdes/* Define to 1 if you have the `setusercontext' function. */ 295255581Sdes#define HAVE_SETUSERCONTEXT 1 296255581Sdes 297276605Sdes/* Define to 1 if you have the `SHA512_Update' function. */ 298276605Sdes/* #undef HAVE_SHA512_UPDATE */ 299276605Sdes 300255581Sdes/* Define to 1 if you have the `sigprocmask' function. */ 301255581Sdes#define HAVE_SIGPROCMASK 1 302255581Sdes 303255581Sdes/* Define to 1 if you have the `sleep' function. */ 304255581Sdes#define HAVE_SLEEP 1 305255581Sdes 306255581Sdes/* Define to 1 if you have the `snprintf' function. */ 307255581Sdes#define HAVE_SNPRINTF 1 308255581Sdes 309255581Sdes/* Define to 1 if you have the `socketpair' function. */ 310255581Sdes#define HAVE_SOCKETPAIR 1 311255581Sdes 312255581Sdes/* Using Solaris threads */ 313255581Sdes/* #undef HAVE_SOLARIS_THREADS */ 314255581Sdes 315255581Sdes/* Define to 1 if you have the `srandom' function. */ 316255581Sdes#define HAVE_SRANDOM 1 317255581Sdes 318255581Sdes/* Define if you have the SSL libraries installed. */ 319255581Sdes#define HAVE_SSL /**/ 320255581Sdes 321255581Sdes/* Define to 1 if you have the <stdarg.h> header file. */ 322255581Sdes#define HAVE_STDARG_H 1 323255581Sdes 324255581Sdes/* Define to 1 if you have the <stdbool.h> header file. */ 325255581Sdes#define HAVE_STDBOOL_H 1 326255581Sdes 327255581Sdes/* Define to 1 if you have the <stdint.h> header file. */ 328255581Sdes#define HAVE_STDINT_H 1 329255581Sdes 330255581Sdes/* Define to 1 if you have the <stdlib.h> header file. */ 331255581Sdes#define HAVE_STDLIB_H 1 332255581Sdes 333255581Sdes/* Define to 1 if you have the `strftime' function. */ 334255581Sdes#define HAVE_STRFTIME 1 335255581Sdes 336255581Sdes/* Define to 1 if you have the <strings.h> header file. */ 337255581Sdes#define HAVE_STRINGS_H 1 338255581Sdes 339255581Sdes/* Define to 1 if you have the <string.h> header file. */ 340255581Sdes#define HAVE_STRING_H 1 341255581Sdes 342266114Sdes/* Define to 1 if you have the `strlcat' function. */ 343266114Sdes#define HAVE_STRLCAT 1 344266114Sdes 345255581Sdes/* Define to 1 if you have the `strlcpy' function. */ 346255581Sdes#define HAVE_STRLCPY 1 347255581Sdes 348255581Sdes/* Define to 1 if you have the `strptime' function. */ 349255581Sdes#define HAVE_STRPTIME 1 350255581Sdes 351255581Sdes/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ 352255581Sdes/* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */ 353255581Sdes 354255581Sdes/* Define if you have Swig libraries and header files. */ 355255581Sdes/* #undef HAVE_SWIG */ 356255581Sdes 357255581Sdes/* Define to 1 if you have the <syslog.h> header file. */ 358255581Sdes#define HAVE_SYSLOG_H 1 359255581Sdes 360255581Sdes/* Define to 1 if you have the <sys/param.h> header file. */ 361255581Sdes#define HAVE_SYS_PARAM_H 1 362255581Sdes 363255581Sdes/* Define to 1 if you have the <sys/resource.h> header file. */ 364255581Sdes#define HAVE_SYS_RESOURCE_H 1 365255581Sdes 366276605Sdes/* Define to 1 if you have the <sys/sha2.h> header file. */ 367276605Sdes/* #undef HAVE_SYS_SHA2_H */ 368276605Sdes 369255581Sdes/* Define to 1 if you have the <sys/socket.h> header file. */ 370255581Sdes#define HAVE_SYS_SOCKET_H 1 371255581Sdes 372255581Sdes/* Define to 1 if you have the <sys/stat.h> header file. */ 373255581Sdes#define HAVE_SYS_STAT_H 1 374255581Sdes 375276605Sdes/* Define to 1 if you have the <sys/sysctl.h> header file. */ 376276605Sdes/* #undef HAVE_SYS_SYSCTL_H */ 377276605Sdes 378255581Sdes/* Define to 1 if you have the <sys/types.h> header file. */ 379255581Sdes#define HAVE_SYS_TYPES_H 1 380255581Sdes 381255581Sdes/* Define to 1 if you have the <sys/uio.h> header file. */ 382255581Sdes#define HAVE_SYS_UIO_H 1 383255581Sdes 384276699Sdes/* Define to 1 if you have the <sys/un.h> header file. */ 385276699Sdes#define HAVE_SYS_UN_H 1 386276699Sdes 387255581Sdes/* Define to 1 if you have the <sys/wait.h> header file. */ 388255581Sdes#define HAVE_SYS_WAIT_H 1 389255581Sdes 390255581Sdes/* Define to 1 if you have the <time.h> header file. */ 391255581Sdes#define HAVE_TIME_H 1 392255581Sdes 393255581Sdes/* Define to 1 if you have the `tzset' function. */ 394255581Sdes#define HAVE_TZSET 1 395255581Sdes 396255581Sdes/* Define to 1 if you have the <unistd.h> header file. */ 397255581Sdes#define HAVE_UNISTD_H 1 398255581Sdes 399255581Sdes/* Define to 1 if you have the `usleep' function. */ 400255581Sdes#define HAVE_USLEEP 1 401255581Sdes 402255581Sdes/* Define to 1 if you have the `vfork' function. */ 403255581Sdes#define HAVE_VFORK 1 404255581Sdes 405255581Sdes/* Define to 1 if you have the <vfork.h> header file. */ 406255581Sdes/* #undef HAVE_VFORK_H */ 407255581Sdes 408255581Sdes/* Define to 1 if you have the <windows.h> header file. */ 409255581Sdes/* #undef HAVE_WINDOWS_H */ 410255581Sdes 411255581Sdes/* Using Windows threads */ 412255581Sdes/* #undef HAVE_WINDOWS_THREADS */ 413255581Sdes 414255581Sdes/* Define to 1 if you have the <winsock2.h> header file. */ 415255581Sdes/* #undef HAVE_WINSOCK2_H */ 416255581Sdes 417255581Sdes/* Define to 1 if `fork' works. */ 418255581Sdes#define HAVE_WORKING_FORK 1 419255581Sdes 420255581Sdes/* Define to 1 if `vfork' works. */ 421255581Sdes#define HAVE_WORKING_VFORK 1 422255581Sdes 423255581Sdes/* Define to 1 if you have the `writev' function. */ 424255581Sdes#define HAVE_WRITEV 1 425255581Sdes 426255581Sdes/* Define to 1 if you have the <ws2tcpip.h> header file. */ 427255581Sdes/* #undef HAVE_WS2TCPIP_H */ 428255581Sdes 429255581Sdes/* Define to 1 if you have the `_beginthreadex' function. */ 430255581Sdes/* #undef HAVE__BEGINTHREADEX */ 431255581Sdes 432255581Sdes/* if lex has yylex_destroy */ 433255581Sdes#define LEX_HAS_YYLEX_DESTROY 1 434255581Sdes 435276699Sdes/* Define to the sub-directory in which libtool stores uninstalled libraries. 436276699Sdes */ 437255581Sdes#define LT_OBJDIR ".libs/" 438255581Sdes 439255581Sdes/* Define to the maximum message length to pass to syslog. */ 440255581Sdes#define MAXSYSLOGMSGLEN 10240 441255581Sdes 442255581Sdes/* Define if memcmp() does not compare unsigned bytes */ 443255581Sdes/* #undef MEMCMP_IS_BROKEN */ 444255581Sdes 445255581Sdes/* Define if mkdir has one argument. */ 446255581Sdes/* #undef MKDIR_HAS_ONE_ARG */ 447255581Sdes 448255581Sdes/* Define if the network stack does not fully support nonblocking io (causes 449255581Sdes lower performance). */ 450255581Sdes/* #undef NONBLOCKING_IS_BROKEN */ 451255581Sdes 452255581Sdes/* Put -D_ALL_SOURCE define in config.h */ 453255581Sdes/* #undef OMITTED__D_ALL_SOURCE */ 454255581Sdes 455255581Sdes/* Put -D_BSD_SOURCE define in config.h */ 456255581Sdes/* #undef OMITTED__D_BSD_SOURCE */ 457255581Sdes 458255581Sdes/* Put -D_GNU_SOURCE define in config.h */ 459255581Sdes/* #undef OMITTED__D_GNU_SOURCE */ 460255581Sdes 461255581Sdes/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ 462255581Sdes/* #undef OMITTED__D_LARGEFILE_SOURCE_1 */ 463255581Sdes 464255581Sdes/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ 465255581Sdes/* #undef OMITTED__D_POSIX_C_SOURCE_200112 */ 466255581Sdes 467255581Sdes/* Put -D_XOPEN_SOURCE=600 define in config.h */ 468255581Sdes/* #undef OMITTED__D_XOPEN_SOURCE_600 */ 469255581Sdes 470255581Sdes/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ 471255581Sdes/* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */ 472255581Sdes 473255581Sdes/* Put -D__EXTENSIONS__ define in config.h */ 474255581Sdes/* #undef OMITTED__D__EXTENSIONS__ */ 475255581Sdes 476255581Sdes/* Define to the address where bug reports for this package should be sent. */ 477255581Sdes#define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl" 478255581Sdes 479255581Sdes/* Define to the full name of this package. */ 480255581Sdes#define PACKAGE_NAME "unbound" 481255581Sdes 482255581Sdes/* Define to the full name and version of this package. */ 483276605Sdes#define PACKAGE_STRING "unbound 1.5.1" 484255581Sdes 485255581Sdes/* Define to the one symbol short name of this package. */ 486255581Sdes#define PACKAGE_TARNAME "unbound" 487255581Sdes 488255581Sdes/* Define to the home page for this package. */ 489255581Sdes#define PACKAGE_URL "" 490255581Sdes 491255581Sdes/* Define to the version of this package. */ 492276605Sdes#define PACKAGE_VERSION "1.5.1" 493255581Sdes 494255581Sdes/* default pidfile location */ 495255581Sdes#define PIDFILE "/var/unbound/unbound.pid" 496255581Sdes 497255581Sdes/* Define to necessary symbol if this constant uses a non-standard name on 498255581Sdes your system. */ 499255581Sdes/* #undef PTHREAD_CREATE_JOINABLE */ 500255581Sdes 501255581Sdes/* Define as the return type of signal handlers (`int' or `void'). */ 502255581Sdes#define RETSIGTYPE void 503255581Sdes 504255581Sdes/* default rootkey location */ 505255581Sdes#define ROOT_ANCHOR_FILE "/var/unbound/root.key" 506255581Sdes 507255581Sdes/* default rootcert location */ 508255581Sdes#define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" 509255581Sdes 510255581Sdes/* version number for resource files */ 511276605Sdes#define RSRC_PACKAGE_VERSION 1,5,1,0 512255581Sdes 513255581Sdes/* Directory to chdir to */ 514255581Sdes#define RUN_DIR "/var/unbound" 515255581Sdes 516255581Sdes/* Shared data */ 517255581Sdes#define SHARE_DIR "/var/unbound" 518255581Sdes 519266114Sdes/* The size of `time_t', as computed by sizeof. */ 520266114Sdes#define SIZEOF_TIME_T 8 521266114Sdes 522255581Sdes/* Define to 1 if you have the ANSI C header files. */ 523255581Sdes#define STDC_HEADERS 1 524255581Sdes 525255581Sdes/* use default strptime. */ 526255581Sdes#define STRPTIME_WORKS 1 527255581Sdes 528255581Sdes/* Use win32 resources and API */ 529255581Sdes/* #undef UB_ON_WINDOWS */ 530255581Sdes 531255581Sdes/* default username */ 532255581Sdes#define UB_USERNAME "unbound" 533255581Sdes 534255581Sdes/* use to enable lightweight alloc assertions, for debug use */ 535255581Sdes/* #undef UNBOUND_ALLOC_LITE */ 536255581Sdes 537255581Sdes/* use malloc not regions, for debug use */ 538255581Sdes/* #undef UNBOUND_ALLOC_NONREGIONAL */ 539255581Sdes 540255581Sdes/* use statistics for allocs and frees, for debug use */ 541255581Sdes/* #undef UNBOUND_ALLOC_STATS */ 542255581Sdes 543255581Sdes/* define this to enable debug checks. */ 544255581Sdes/* #undef UNBOUND_DEBUG */ 545255581Sdes 546276605Sdes/* Define to 1 to enable dnstap support */ 547276605Sdes/* #undef USE_DNSTAP */ 548276605Sdes 549255581Sdes/* Define this to enable ECDSA support. */ 550255581Sdes#define USE_ECDSA 1 551255581Sdes 552255581Sdes/* Define this to enable an EVP workaround for older openssl */ 553255581Sdes/* #undef USE_ECDSA_EVP_WORKAROUND */ 554255581Sdes 555255581Sdes/* Define this to enable GOST support. */ 556255581Sdes/* #undef USE_GOST */ 557255581Sdes 558255581Sdes/* Define if you want to use internal select based events */ 559255581Sdes#define USE_MINI_EVENT 1 560255581Sdes 561255581Sdes/* Define this to enable SHA256 and SHA512 support. */ 562255581Sdes#define USE_SHA2 1 563255581Sdes 564255581Sdes/* Enable extensions on AIX 3, Interix. */ 565255581Sdes#ifndef _ALL_SOURCE 566255581Sdes# define _ALL_SOURCE 1 567255581Sdes#endif 568255581Sdes/* Enable GNU extensions on systems that have them. */ 569255581Sdes#ifndef _GNU_SOURCE 570255581Sdes# define _GNU_SOURCE 1 571255581Sdes#endif 572255581Sdes/* Enable threading extensions on Solaris. */ 573255581Sdes#ifndef _POSIX_PTHREAD_SEMANTICS 574255581Sdes# define _POSIX_PTHREAD_SEMANTICS 1 575255581Sdes#endif 576255581Sdes/* Enable extensions on HP NonStop. */ 577255581Sdes#ifndef _TANDEM_SOURCE 578255581Sdes# define _TANDEM_SOURCE 1 579255581Sdes#endif 580255581Sdes/* Enable general extensions on Solaris. */ 581255581Sdes#ifndef __EXTENSIONS__ 582255581Sdes# define __EXTENSIONS__ 1 583255581Sdes#endif 584255581Sdes 585255581Sdes 586255581Sdes/* Whether the windows socket API is used */ 587255581Sdes/* #undef USE_WINSOCK */ 588255581Sdes 589255581Sdes/* the version of the windows API enabled */ 590255581Sdes#define WINVER 0x0502 591255581Sdes 592255581Sdes/* Define if you want Python module. */ 593255581Sdes/* #undef WITH_PYTHONMODULE */ 594255581Sdes 595255581Sdes/* Define if you want PyUnbound. */ 596255581Sdes/* #undef WITH_PYUNBOUND */ 597255581Sdes 598255581Sdes/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a 599255581Sdes `char[]'. */ 600255581Sdes#define YYTEXT_POINTER 1 601255581Sdes 602255581Sdes/* Enable large inode numbers on Mac OS X 10.5. */ 603255581Sdes#ifndef _DARWIN_USE_64_BIT_INODE 604255581Sdes# define _DARWIN_USE_64_BIT_INODE 1 605255581Sdes#endif 606255581Sdes 607255581Sdes/* Number of bits in a file offset, on hosts where this is settable. */ 608255581Sdes/* #undef _FILE_OFFSET_BITS */ 609255581Sdes 610255581Sdes/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 611255581Sdes/* #undef _LARGEFILE_SOURCE */ 612255581Sdes 613255581Sdes/* Define for large files, on AIX-style hosts. */ 614255581Sdes/* #undef _LARGE_FILES */ 615255581Sdes 616255581Sdes/* Define to 1 if on MINIX. */ 617255581Sdes/* #undef _MINIX */ 618255581Sdes 619266114Sdes/* Enable for compile on Minix */ 620266114Sdes/* #undef _NETBSD_SOURCE */ 621266114Sdes 622255581Sdes/* Define to 2 if the system does not provide POSIX.1 features except with 623255581Sdes this defined. */ 624255581Sdes/* #undef _POSIX_1_SOURCE */ 625255581Sdes 626255581Sdes/* Define to 1 if you need to in order for `stat' and other things to work. */ 627255581Sdes/* #undef _POSIX_SOURCE */ 628255581Sdes 629255581Sdes/* Define to empty if `const' does not conform to ANSI C. */ 630255581Sdes/* #undef const */ 631255581Sdes 632255581Sdes/* Define to `int' if <sys/types.h> doesn't define. */ 633255581Sdes/* #undef gid_t */ 634255581Sdes 635255581Sdes/* in_addr_t */ 636255581Sdes/* #undef in_addr_t */ 637255581Sdes 638255581Sdes/* in_port_t */ 639255581Sdes/* #undef in_port_t */ 640255581Sdes 641255581Sdes/* Define to `__inline__' or `__inline' if that's what the C compiler 642255581Sdes calls it, or to nothing if 'inline' is not supported under any name. */ 643255581Sdes#ifndef __cplusplus 644255581Sdes/* #undef inline */ 645255581Sdes#endif 646255581Sdes 647255581Sdes/* Define to `short' if <sys/types.h> does not define. */ 648255581Sdes/* #undef int16_t */ 649255581Sdes 650255581Sdes/* Define to `int' if <sys/types.h> does not define. */ 651255581Sdes/* #undef int32_t */ 652255581Sdes 653255581Sdes/* Define to `long long' if <sys/types.h> does not define. */ 654255581Sdes/* #undef int64_t */ 655255581Sdes 656255581Sdes/* Define to `signed char' if <sys/types.h> does not define. */ 657255581Sdes/* #undef int8_t */ 658255581Sdes 659255581Sdes/* Define if replacement function should be used. */ 660255581Sdes/* #undef malloc */ 661255581Sdes 662255581Sdes/* Define to `long int' if <sys/types.h> does not define. */ 663255581Sdes/* #undef off_t */ 664255581Sdes 665255581Sdes/* Define to `int' if <sys/types.h> does not define. */ 666255581Sdes/* #undef pid_t */ 667255581Sdes 668255581Sdes/* Define to 'int' if not defined */ 669255581Sdes/* #undef rlim_t */ 670255581Sdes 671255581Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */ 672255581Sdes/* #undef size_t */ 673255581Sdes 674255581Sdes/* Define to 'int' if not defined */ 675255581Sdes/* #undef socklen_t */ 676255581Sdes 677255581Sdes/* Define to `int' if <sys/types.h> does not define. */ 678255581Sdes/* #undef ssize_t */ 679255581Sdes 680255581Sdes/* Define to 'unsigned char if not defined */ 681255581Sdes/* #undef u_char */ 682255581Sdes 683255581Sdes/* Define to `int' if <sys/types.h> doesn't define. */ 684255581Sdes/* #undef uid_t */ 685255581Sdes 686255581Sdes/* Define to `unsigned short' if <sys/types.h> does not define. */ 687255581Sdes/* #undef uint16_t */ 688255581Sdes 689255581Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */ 690255581Sdes/* #undef uint32_t */ 691255581Sdes 692255581Sdes/* Define to `unsigned long long' if <sys/types.h> does not define. */ 693255581Sdes/* #undef uint64_t */ 694255581Sdes 695255581Sdes/* Define to `unsigned char' if <sys/types.h> does not define. */ 696255581Sdes/* #undef uint8_t */ 697255581Sdes 698255581Sdes/* Define as `fork' if `vfork' does not work. */ 699255581Sdes/* #undef vfork */ 700255581Sdes 701255581Sdes#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE) 702255581Sdes#define _GNU_SOURCE 1 703255581Sdes#endif 704255581Sdes 705255581Sdes#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE) 706255581Sdes#define _BSD_SOURCE 1 707255581Sdes#endif 708255581Sdes 709255581Sdes#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__) 710255581Sdes#define __EXTENSIONS__ 1 711255581Sdes#endif 712255581Sdes 713255581Sdes#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE) 714255581Sdes#define _POSIX_C_SOURCE 200112 715255581Sdes#endif 716255581Sdes 717255581Sdes#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE) 718255581Sdes#define _XOPEN_SOURCE 600 719255581Sdes#endif 720255581Sdes 721255581Sdes#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED) 722255581Sdes#define _XOPEN_SOURCE_EXTENDED 1 723255581Sdes#endif 724255581Sdes 725255581Sdes#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE) 726255581Sdes#define _ALL_SOURCE 1 727255581Sdes#endif 728255581Sdes 729255581Sdes#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE) 730255581Sdes#define _LARGEFILE_SOURCE 1 731255581Sdes#endif 732255581Sdes 733255581Sdes 734255581Sdes 735255581Sdes 736255581Sdes#ifndef UNBOUND_DEBUG 737255581Sdes# define NDEBUG 738255581Sdes#endif 739255581Sdes 740266114Sdes/** Use small-ldns codebase */ 741266114Sdes#define USE_SLDNS 1 742266114Sdes#ifdef HAVE_SSL 743266114Sdes# define LDNS_BUILD_CONFIG_HAVE_SSL 1 744266114Sdes#endif 745266114Sdes 746255581Sdes#include <stdio.h> 747255581Sdes#include <string.h> 748255581Sdes#include <unistd.h> 749255581Sdes#include <assert.h> 750255581Sdes 751255581Sdes#if STDC_HEADERS 752255581Sdes#include <stdlib.h> 753255581Sdes#include <stddef.h> 754255581Sdes#endif 755255581Sdes 756266114Sdes#ifdef HAVE_STDARG_H 757266114Sdes#include <stdarg.h> 758266114Sdes#endif 759266114Sdes 760255581Sdes#ifdef HAVE_STDINT_H 761255581Sdes#include <stdint.h> 762255581Sdes#endif 763255581Sdes 764255581Sdes#include <errno.h> 765255581Sdes 766255581Sdes#if HAVE_SYS_PARAM_H 767255581Sdes#include <sys/param.h> 768255581Sdes#endif 769255581Sdes 770255581Sdes#ifdef HAVE_SYS_SOCKET_H 771255581Sdes#include <sys/socket.h> 772255581Sdes#endif 773255581Sdes 774255581Sdes#ifdef HAVE_SYS_UIO_H 775255581Sdes#include <sys/uio.h> 776255581Sdes#endif 777255581Sdes 778255581Sdes#ifdef HAVE_NETINET_IN_H 779255581Sdes#include <netinet/in.h> 780255581Sdes#endif 781255581Sdes 782255581Sdes#ifdef HAVE_ARPA_INET_H 783255581Sdes#include <arpa/inet.h> 784255581Sdes#endif 785255581Sdes 786255581Sdes#ifdef HAVE_WINSOCK2_H 787255581Sdes#include <winsock2.h> 788255581Sdes#endif 789255581Sdes 790255581Sdes#ifdef HAVE_WS2TCPIP_H 791255581Sdes#include <ws2tcpip.h> 792255581Sdes#endif 793255581Sdes 794266114Sdes#ifndef USE_WINSOCK 795266114Sdes#define ARG_LL "%ll" 796266114Sdes#else 797266114Sdes#define ARG_LL "%I64" 798266114Sdes#endif 799255581Sdes 800266114Sdes 801255581Sdes 802255581Sdes#ifdef HAVE_ATTR_FORMAT 803255581Sdes# define ATTR_FORMAT(archetype, string_index, first_to_check) \ 804255581Sdes __attribute__ ((format (archetype, string_index, first_to_check))) 805255581Sdes#else /* !HAVE_ATTR_FORMAT */ 806255581Sdes# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ 807255581Sdes#endif /* !HAVE_ATTR_FORMAT */ 808255581Sdes 809255581Sdes 810255581Sdes#if defined(DOXYGEN) 811255581Sdes# define ATTR_UNUSED(x) x 812255581Sdes#elif defined(__cplusplus) 813255581Sdes# define ATTR_UNUSED(x) 814255581Sdes#elif defined(HAVE_ATTR_UNUSED) 815255581Sdes# define ATTR_UNUSED(x) x __attribute__((unused)) 816255581Sdes#else /* !HAVE_ATTR_UNUSED */ 817255581Sdes# define ATTR_UNUSED(x) x 818255581Sdes#endif /* !HAVE_ATTR_UNUSED */ 819255581Sdes 820255581Sdes 821255581Sdes#ifndef HAVE_FSEEKO 822255581Sdes#define fseeko fseek 823255581Sdes#define ftello ftell 824255581Sdes#endif /* HAVE_FSEEKO */ 825255581Sdes 826255581Sdes 827255581Sdes#ifndef MAXHOSTNAMELEN 828255581Sdes#define MAXHOSTNAMELEN 256 829255581Sdes#endif 830255581Sdes 831255581Sdes 832255581Sdes#ifndef HAVE_SNPRINTF 833255581Sdes#define snprintf snprintf_unbound 834255581Sdes#define vsnprintf vsnprintf_unbound 835255581Sdes#include <stdarg.h> 836255581Sdesint snprintf (char *str, size_t count, const char *fmt, ...); 837255581Sdesint vsnprintf (char *str, size_t count, const char *fmt, va_list arg); 838255581Sdes#endif /* HAVE_SNPRINTF */ 839255581Sdes 840255581Sdes 841255581Sdes#ifndef HAVE_INET_PTON 842255581Sdes#define inet_pton inet_pton_unbound 843255581Sdesint inet_pton(int af, const char* src, void* dst); 844255581Sdes#endif /* HAVE_INET_PTON */ 845255581Sdes 846255581Sdes 847255581Sdes#ifndef HAVE_INET_NTOP 848255581Sdes#define inet_ntop inet_ntop_unbound 849255581Sdesconst char *inet_ntop(int af, const void *src, char *dst, size_t size); 850255581Sdes#endif 851255581Sdes 852255581Sdes 853255581Sdes#ifndef HAVE_INET_ATON 854255581Sdes#define inet_aton inet_aton_unbound 855255581Sdesint inet_aton(const char *cp, struct in_addr *addr); 856255581Sdes#endif 857255581Sdes 858255581Sdes 859255581Sdes#ifndef HAVE_MEMMOVE 860255581Sdes#define memmove memmove_unbound 861255581Sdesvoid *memmove(void *dest, const void *src, size_t n); 862255581Sdes#endif 863255581Sdes 864255581Sdes 865266114Sdes#ifndef HAVE_STRLCAT 866266114Sdes#define strlcat strlcat_unbound 867266114Sdessize_t strlcat(char *dst, const char *src, size_t siz); 868266114Sdes#endif 869266114Sdes 870266114Sdes 871255581Sdes#ifndef HAVE_STRLCPY 872255581Sdes#define strlcpy strlcpy_unbound 873255581Sdessize_t strlcpy(char *dst, const char *src, size_t siz); 874255581Sdes#endif 875255581Sdes 876255581Sdes 877255581Sdes#ifndef HAVE_GMTIME_R 878255581Sdes#define gmtime_r gmtime_r_unbound 879255581Sdesstruct tm *gmtime_r(const time_t *timep, struct tm *result); 880255581Sdes#endif 881255581Sdes 882255581Sdes 883266114Sdes#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H) 884255581Sdes#define sleep(x) Sleep((x)*1000) /* on win32 */ 885255581Sdes#endif /* HAVE_SLEEP */ 886255581Sdes 887255581Sdes 888255581Sdes#ifndef HAVE_USLEEP 889255581Sdes#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */ 890255581Sdes#endif /* HAVE_USLEEP */ 891255581Sdes 892255581Sdes 893255581Sdes#ifndef HAVE_RANDOM 894255581Sdes#define random rand /* on win32, for tests only (bad random) */ 895255581Sdes#endif /* HAVE_RANDOM */ 896255581Sdes 897255581Sdes 898255581Sdes#ifndef HAVE_SRANDOM 899255581Sdes#define srandom(x) srand(x) /* on win32, for tests only (bad random) */ 900255581Sdes#endif /* HAVE_SRANDOM */ 901255581Sdes 902255581Sdes 903255581Sdes/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */ 904255581Sdes#ifdef HAVE_WINSOCK2_H 905255581Sdes#define FD_SET_T (u_int) 906255581Sdes#else 907255581Sdes#define FD_SET_T 908255581Sdes#endif 909255581Sdes 910255581Sdes 911255581Sdes#ifndef IPV6_MIN_MTU 912255581Sdes#define IPV6_MIN_MTU 1280 913255581Sdes#endif /* IPV6_MIN_MTU */ 914255581Sdes 915255581Sdes 916255581Sdes#ifdef MEMCMP_IS_BROKEN 917255581Sdes#include "compat/memcmp.h" 918255581Sdes#define memcmp memcmp_unbound 919255581Sdesint memcmp(const void *x, const void *y, size_t n); 920255581Sdes#endif 921255581Sdes 922255581Sdes 923255581Sdes 924255581Sdes#ifndef HAVE_CTIME_R 925255581Sdes#define ctime_r unbound_ctime_r 926255581Sdeschar *ctime_r(const time_t *timep, char *buf); 927255581Sdes#endif 928255581Sdes 929255581Sdes#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) 930255581Sdes#define strptime unbound_strptime 931255581Sdesstruct tm; 932255581Sdeschar *strptime(const char *s, const char *format, struct tm *tm); 933255581Sdes#endif 934255581Sdes 935276605Sdes#ifdef HAVE_LIBRESSL 936276605Sdes# if !HAVE_DECL_STRLCPY 937276605Sdessize_t strlcpy(char *dst, const char *src, size_t siz); 938276605Sdes# endif 939276605Sdes# if !HAVE_DECL_STRLCAT 940276605Sdessize_t strlcat(char *dst, const char *src, size_t siz); 941276605Sdes# endif 942276605Sdes# if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM) 943276605Sdesuint32_t arc4random(void); 944276605Sdes# endif 945276605Sdes# if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM) 946276605Sdesuint32_t arc4random_uniform(uint32_t upper_bound); 947276605Sdes# endif 948276605Sdes#endif /* HAVE_LIBRESSL */ 949276605Sdes#ifndef HAVE_ARC4RANDOM 950276605Sdesvoid explicit_bzero(void* buf, size_t len); 951276605Sdesint getentropy(void* buf, size_t len); 952276605Sdesuint32_t arc4random(void); 953276605Sdesvoid arc4random_buf(void* buf, size_t n); 954276605Sdesvoid _ARC4_LOCK(void); 955276605Sdesvoid _ARC4_UNLOCK(void); 956276605Sdes#endif 957276605Sdes#ifndef HAVE_ARC4RANDOM_UNIFORM 958276605Sdesuint32_t arc4random_uniform(uint32_t upper_bound); 959276605Sdes#endif 960276605Sdes#ifdef COMPAT_SHA512 961276605Sdes#ifndef SHA512_DIGEST_LENGTH 962276605Sdes#define SHA512_BLOCK_LENGTH 128 963276605Sdes#define SHA512_DIGEST_LENGTH 64 964276605Sdes#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) 965276605Sdestypedef struct _SHA512_CTX { 966276605Sdes uint64_t state[8]; 967276605Sdes uint64_t bitcount[2]; 968276605Sdes uint8_t buffer[SHA512_BLOCK_LENGTH]; 969276605Sdes} SHA512_CTX; 970276605Sdes#endif /* SHA512_DIGEST_LENGTH */ 971276605Sdesvoid SHA512_Init(SHA512_CTX*); 972276605Sdesvoid SHA512_Update(SHA512_CTX*, void*, size_t); 973276605Sdesvoid SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*); 974276605Sdesunsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest); 975276605Sdes#endif /* COMPAT_SHA512 */ 976276605Sdes 977276605Sdes 978276605Sdes 979255581Sdes#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)) 980255581Sdes /* using version of libevent that is not threadsafe. */ 981255581Sdes# define LIBEVENT_SIGNAL_PROBLEM 1 982255581Sdes#endif 983255581Sdes 984255581Sdes#ifndef CHECKED_INET6 985255581Sdes# define CHECKED_INET6 986255581Sdes# ifdef AF_INET6 987255581Sdes# define INET6 988255581Sdes# else 989255581Sdes# define AF_INET6 28 990255581Sdes# endif 991255581Sdes#endif /* CHECKED_INET6 */ 992255581Sdes 993255581Sdes#ifndef HAVE_GETADDRINFO 994255581Sdesstruct sockaddr_storage; 995255581Sdes#include "compat/fake-rfc2553.h" 996255581Sdes#endif 997255581Sdes 998255581Sdes#ifdef UNBOUND_ALLOC_STATS 999255581Sdes# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__) 1000255581Sdes# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__) 1001255581Sdes# define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__) 1002255581Sdes# define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__) 1003255581Sdesvoid *unbound_stat_malloc(size_t size); 1004255581Sdesvoid *unbound_stat_calloc(size_t nmemb, size_t size); 1005255581Sdesvoid unbound_stat_free(void *ptr); 1006255581Sdesvoid *unbound_stat_realloc(void *ptr, size_t size); 1007255581Sdesvoid *unbound_stat_malloc_log(size_t size, const char* file, int line, 1008255581Sdes const char* func); 1009255581Sdesvoid *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file, 1010255581Sdes int line, const char* func); 1011255581Sdesvoid unbound_stat_free_log(void *ptr, const char* file, int line, 1012255581Sdes const char* func); 1013255581Sdesvoid *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, 1014255581Sdes int line, const char* func); 1015255581Sdes#elif defined(UNBOUND_ALLOC_LITE) 1016255581Sdes# include "util/alloc.h" 1017255581Sdes#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */ 1018255581Sdes 1019255581Sdes/** default port for DNS traffic. */ 1020255581Sdes#define UNBOUND_DNS_PORT 53 1021255581Sdes/** default port for unbound control traffic, registered port with IANA, 1022255581Sdes ub-dns-control 8953/tcp unbound dns nameserver control */ 1023255581Sdes#define UNBOUND_CONTROL_PORT 8953 1024255581Sdes/** the version of unbound-control that this software implements */ 1025255581Sdes#define UNBOUND_CONTROL_VERSION 1 1026255581Sdes 1027255581Sdes 1028