1 /* ldns/config.h. Generated from config.h.in by configure. */ 2 /* ldns/config.h.in. Generated from configure.ac by autoheader. */ 3 4 /* Define if building universal (internal helper macro) */ 5 /* #undef AC_APPLE_UNIVERSAL_BUILD */ 6 7 /* Define to 1 if you have the <arpa/inet.h> header file. */ 8 #define HAVE_ARPA_INET_H 1 9 10 /* Whether the C compiler accepts the "format" attribute */ 11 #define HAVE_ATTR_FORMAT 1 12 13 /* Whether the C compiler accepts the "unused" attribute */ 14 #define HAVE_ATTR_UNUSED 1 15 16 /* Define to 1 if you have the `b32_ntop' function. */ 17 /* #undef HAVE_B32_NTOP */ 18 19 /* Define to 1 if you have the `b32_pton' function. */ 20 /* #undef HAVE_B32_PTON */ 21 22 /* Define to 1 if you have the `b64_ntop' function. */ 23 /* #undef HAVE_B64_NTOP */ 24 25 /* Define to 1 if you have the `b64_pton' function. */ 26 /* #undef HAVE_B64_PTON */ 27 28 /* Define to 1 if you have the `ctime_r' function. */ 29 #define HAVE_CTIME_R 1 30 31 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you 32 don't. */ 33 /* #undef HAVE_DECL_NID_SECP384R1 */ 34 35 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 36 if you don't. */ 37 /* #undef HAVE_DECL_NID_X9_62_PRIME256V1 */ 38 39 /* Define to 1 if you have the <dlfcn.h> header file. */ 40 #define HAVE_DLFCN_H 1 41 42 /* Define to 1 if you have the `endprotoent' function. */ 43 #define HAVE_ENDPROTOENT 1 44 45 /* Define to 1 if you have the `endservent' function. */ 46 #define HAVE_ENDSERVENT 1 47 48 /* Define to 1 if you have the `EVP_sha256' function. */ 49 #define HAVE_EVP_SHA256 1 50 51 /* Define to 1 if you have the `fcntl' function. */ 52 #define HAVE_FCNTL 1 53 54 /* Whether getaddrinfo is available */ 55 #define HAVE_GETADDRINFO 1 56 57 /* Define to 1 if you have the <getopt.h> header file. */ 58 #define HAVE_GETOPT_H 1 59 60 /* Define to 1 if you have the `gmtime_r' function. */ 61 #define HAVE_GMTIME_R 1 62 63 /* If you have HMAC_CTX_init */ 64 #define HAVE_HMAC_CTX_INIT 1 65 66 /* Define to 1 if you have the `inet_aton' function. */ 67 #define HAVE_INET_ATON 1 68 69 /* Define to 1 if you have the `inet_ntop' function. */ 70 #define HAVE_INET_NTOP 1 71 72 /* Define to 1 if you have the `inet_pton' function. */ 73 #define HAVE_INET_PTON 1 74 75 /* define if you have inttypes.h */ 76 #define HAVE_INTTYPES_H 1 77 78 /* if the function 'ioctlsocket' is available */ 79 /* #undef HAVE_IOCTLSOCKET */ 80 81 /* Define to 1 if you have the `isblank' function. */ 82 #define HAVE_ISBLANK 1 83 84 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and 85 to 0 otherwise. */ 86 #define HAVE_MALLOC 1 87 88 /* Define to 1 if you have the `memmove' function. */ 89 #define HAVE_MEMMOVE 1 90 91 /* Define to 1 if you have the <memory.h> header file. */ 92 #define HAVE_MEMORY_H 1 93 94 /* Define to 1 if you have the <netdb.h> header file. */ 95 #define HAVE_NETDB_H 1 96 97 /* Define to 1 if you have the <netinet/in.h> header file. */ 98 #define HAVE_NETINET_IN_H 1 99 100 /* Define to 1 if you have the <openssl/err.h> header file. */ 101 #define HAVE_OPENSSL_ERR_H 1 102 103 /* Define to 1 if you have the <openssl/rand.h> header file. */ 104 #define HAVE_OPENSSL_RAND_H 1 105 106 /* Define to 1 if you have the <openssl/ssl.h> header file. */ 107 #define HAVE_OPENSSL_SSL_H 1 108 109 /* Define if you have Python libraries and header files. */ 110 /* #undef HAVE_PYTHON */ 111 112 /* Define to 1 if you have the `random' function. */ 113 #define HAVE_RANDOM 1 114 115 /* Define to 1 if your system has a GNU libc compatible `realloc' function, 116 and to 0 otherwise. */ 117 #define HAVE_REALLOC 1 118 119 /* Define to 1 if you have the `sleep' function. */ 120 #define HAVE_SLEEP 1 121 122 /* Define to 1 if you have the `snprintf' function. */ 123 #define HAVE_SNPRINTF 1 124 125 /* Define if you have the SSL libraries installed. */ 126 #define HAVE_SSL /**/ 127 128 /* Define to 1 if you have the <stdarg.h> header file. */ 129 #define HAVE_STDARG_H 1 130 131 /* Define to 1 if you have the <stdbool.h> header file. */ 132 #define HAVE_STDBOOL_H 1 133 134 /* Define to 1 if you have the <stdint.h> header file. */ 135 #define HAVE_STDINT_H 1 136 137 /* Define to 1 if you have the <stdlib.h> header file. */ 138 #define HAVE_STDLIB_H 1 139 140 /* Define to 1 if you have the <strings.h> header file. */ 141 #define HAVE_STRINGS_H 1 142 143 /* Define to 1 if you have the <string.h> header file. */ 144 #define HAVE_STRING_H 1 145 146 /* Define to 1 if you have the `strlcpy' function. */ 147 #define HAVE_STRLCPY 1 148 149 /* Define to 1 if you have the `strtoul' function. */ 150 #define HAVE_STRTOUL 1 151 152 /* Define if you have Swig libraries and header files. */ 153 /* #undef HAVE_SWIG */ 154 155 /* Define to 1 if you have the <sys/mount.h> header file. */ 156 #define HAVE_SYS_MOUNT_H 1 157 158 /* Define to 1 if you have the <sys/param.h> header file. */ 159 #define HAVE_SYS_PARAM_H 1 160 161 /* define if you have sys/socket.h */ 162 #define HAVE_SYS_SOCKET_H 1 163 164 /* Define to 1 if you have the <sys/stat.h> header file. */ 165 #define HAVE_SYS_STAT_H 1 166 167 /* define if you have sys/types.h */ 168 #define HAVE_SYS_TYPES_H 1 169 170 /* Define to 1 if you have the `timegm' function. */ 171 #define HAVE_TIMEGM 1 172 173 /* Define to 1 if you have the <time.h> header file. */ 174 #define HAVE_TIME_H 1 175 176 /* define if you have unistd.h */ 177 #define HAVE_UNISTD_H 1 178 179 /* Define to 1 if you have the <winsock2.h> header file. */ 180 /* #undef HAVE_WINSOCK2_H */ 181 182 /* Define to 1 if you have the <ws2tcpip.h> header file. */ 183 /* #undef HAVE_WS2TCPIP_H */ 184 185 /* Define to the sub-directory in which libtool stores uninstalled libraries. 186 */ 187 #define LT_OBJDIR ".libs/" 188 189 /* Define to the address where bug reports for this package should be sent. */ 190 #define PACKAGE_BUGREPORT "libdns@nlnetlabs.nl" 191 192 /* Define to the full name of this package. */ 193 #define PACKAGE_NAME "ldns" 194 195 /* Define to the full name and version of this package. */ 196 #define PACKAGE_STRING "ldns 1.6.7" 197 198 /* Define to the one symbol short name of this package. */ 199 #define PACKAGE_TARNAME "libdns" 200 201 /* Define to the home page for this package. */ 202 #define PACKAGE_URL "" 203 204 /* Define to the version of this package. */ 205 #define PACKAGE_VERSION "1.6.7" 206 207 /* Define to 1 if you have the ANSI C header files. */ 208 #define STDC_HEADERS 1 209 210 /* System configuration dir */ 211 #define SYSCONFDIR sysconfdir 212 213 /* Define this to enable ECDSA support. */ 214 /* #undef USE_ECDSA */ 215 216 /* Define this to enable GOST support. */ 217 #define USE_GOST 1 218 219 /* Define this to enable SHA256 and SHA512 support. */ 220 #define USE_SHA2 1 221 222 /* Enable extensions on AIX 3, Interix. */ 223 #ifndef _ALL_SOURCE 224 # define _ALL_SOURCE 1 225 #endif 226 /* Enable GNU extensions on systems that have them. */ 227 #ifndef _GNU_SOURCE 228 # define _GNU_SOURCE 1 229 #endif 230 /* Enable threading extensions on Solaris. */ 231 #ifndef _POSIX_PTHREAD_SEMANTICS 232 # define _POSIX_PTHREAD_SEMANTICS 1 233 #endif 234 /* Enable extensions on HP NonStop. */ 235 #ifndef _TANDEM_SOURCE 236 # define _TANDEM_SOURCE 1 237 #endif 238 /* Enable general extensions on Solaris. */ 239 #ifndef __EXTENSIONS__ 240 # define __EXTENSIONS__ 1 241 #endif 242 243 244 /* Whether the windows socket API is used */ 245 /* #undef USE_WINSOCK */ 246 247 /* the version of the windows API enabled */ 248 #define WINVER 0x0502 249 250 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most 251 significant byte first (like Motorola and SPARC, unlike Intel). */ 252 #if defined AC_APPLE_UNIVERSAL_BUILD 253 # if defined __BIG_ENDIAN__ 254 # define WORDS_BIGENDIAN 1 255 # endif 256 #else 257 # ifndef WORDS_BIGENDIAN 258 /* # undef WORDS_BIGENDIAN */ 259 # endif 260 #endif 261 262 /* Define to 1 if on MINIX. */ 263 /* #undef _MINIX */ 264 265 /* Define to 2 if the system does not provide POSIX.1 features except with 266 this defined. */ 267 /* #undef _POSIX_1_SOURCE */ 268 269 /* Define to 1 if you need to in order for `stat' and other things to work. */ 270 /* #undef _POSIX_SOURCE */ 271 272 /* Define to empty if `const' does not conform to ANSI C. */ 273 /* #undef const */ 274 275 /* in_addr_t */ 276 /* #undef in_addr_t */ 277 278 /* in_port_t */ 279 /* #undef in_port_t */ 280 281 /* Define to `__inline__' or `__inline' if that's what the C compiler 282 calls it, or to nothing if 'inline' is not supported under any name. */ 283 #ifndef __cplusplus 284 /* #undef inline */ 285 #endif 286 287 /* Define to `short' if <sys/types.h> does not define. */ 288 /* #undef int16_t */ 289 290 /* Define to `int' if <sys/types.h> does not define. */ 291 /* #undef int32_t */ 292 293 /* Define to `long long' if <sys/types.h> does not define. */ 294 /* #undef int64_t */ 295 296 /* Define to `char' if <sys/types.h> does not define. */ 297 /* #undef int8_t */ 298 299 /* Define to rpl_malloc if the replacement function should be used. */ 300 /* #undef malloc */ 301 302 /* Define to rpl_realloc if the replacement function should be used. */ 303 /* #undef realloc */ 304 305 /* Define to 'int' if not defined */ 306 /* #undef socklen_t */ 307 308 /* Fallback member name for socket family in struct sockaddr_storage */ 309 /* #undef ss_family */ 310 311 /* Define to `int' if <sys/types.h> does not define. */ 312 /* #undef ssize_t */ 313 314 /* Define to `unsigned short' if <sys/types.h> does not define. */ 315 /* #undef uint16_t */ 316 317 /* Define to `unsigned int' if <sys/types.h> does not define. */ 318 /* #undef uint32_t */ 319 320 /* Define to `unsigned long long' if <sys/types.h> does not define. */ 321 /* #undef uint64_t */ 322 323 /* Define to `unsigned char' if <sys/types.h> does not define. */ 324 /* #undef uint8_t */ 325 326 327 #include <stdio.h> 328 #include <string.h> 329 #include <unistd.h> 330 #include <assert.h> 331 332 #ifndef LITTLE_ENDIAN 333 #define LITTLE_ENDIAN 1234 334 #endif 335 336 #ifndef BIG_ENDIAN 337 #define BIG_ENDIAN 4321 338 #endif 339 340 #ifndef BYTE_ORDER 341 #ifdef WORDS_BIGENDIAN 342 #define BYTE_ORDER BIG_ENDIAN 343 #else 344 #define BYTE_ORDER LITTLE_ENDIAN 345 #endif /* WORDS_BIGENDIAN */ 346 #endif /* BYTE_ORDER */ 347 348 #if STDC_HEADERS 349 #include <stdlib.h> 350 #include <stddef.h> 351 #endif 352 353 #ifdef HAVE_STDINT_H 354 #include <stdint.h> 355 #endif 356 357 #ifdef HAVE_SYS_SOCKET_H 358 #include <sys/socket.h> 359 #endif 360 361 #ifdef HAVE_NETINET_IN_H 362 #include <netinet/in.h> 363 #endif 364 365 #ifdef HAVE_ARPA_INET_H 366 #include <arpa/inet.h> 367 #endif 368 369 #ifdef HAVE_WINSOCK2_H 370 #include <winsock2.h> 371 #endif 372 373 #ifdef HAVE_WS2TCPIP_H 374 #include <ws2tcpip.h> 375 #endif 376 377 378 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */ 379 #ifdef HAVE_WINSOCK2_H 380 #define FD_SET_T (u_int) 381 #else 382 #define FD_SET_T 383 #endif 384 385 386 387 388 #ifdef __cplusplus 389 extern "C" { 390 #endif 391 392 #ifndef B64_PTON 393 int ldns_b64_ntop(uint8_t const *src, size_t srclength, 394 char *target, size_t targsize); 395 /** 396 * calculates the size needed to store the result of b64_ntop 397 */ 398 /*@unused@*/ 399 static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize) 400 { 401 return ((((srcsize + 2) / 3) * 4) + 1); 402 } 403 #endif /* !B64_PTON */ 404 #ifndef B64_NTOP 405 int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize); 406 /** 407 * calculates the size needed to store the result of ldns_b64_pton 408 */ 409 /*@unused@*/ 410 static inline size_t ldns_b64_pton_calculate_size(size_t srcsize) 411 { 412 return (((((srcsize + 3) / 4) * 3)) + 1); 413 } 414 #endif /* !B64_NTOP */ 415 416 #ifndef HAVE_SLEEP 417 /* use windows sleep, in millisecs, instead */ 418 #define sleep(x) Sleep((x)*1000) 419 #endif 420 421 #ifndef HAVE_RANDOM 422 #define srandom(x) srand(x) 423 #define random(x) rand(x) 424 #endif 425 426 #ifndef HAVE_TIMEGM 427 #include <time.h> 428 time_t timegm (struct tm *tm); 429 #endif /* !TIMEGM */ 430 #ifndef HAVE_GMTIME_R 431 struct tm *gmtime_r(const time_t *timep, struct tm *result); 432 #endif 433 #ifndef HAVE_ISBLANK 434 int isblank(int c); 435 #endif /* !HAVE_ISBLANK */ 436 #ifndef HAVE_SNPRINTF 437 #include <stdarg.h> 438 int snprintf (char *str, size_t count, const char *fmt, ...); 439 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); 440 #endif /* HAVE_SNPRINTF */ 441 #ifndef HAVE_INET_PTON 442 int inet_pton(int af, const char* src, void* dst); 443 #endif /* HAVE_INET_PTON */ 444 #ifndef HAVE_INET_NTOP 445 const char *inet_ntop(int af, const void *src, char *dst, size_t size); 446 #endif 447 #ifndef HAVE_INET_ATON 448 int inet_aton(const char *cp, struct in_addr *addr); 449 #endif 450 #ifndef HAVE_MEMMOVE 451 void *memmove(void *dest, const void *src, size_t n); 452 #endif 453 #ifndef HAVE_STRLCPY 454 size_t strlcpy(char *dst, const char *src, size_t siz); 455 #endif 456 #ifdef __cplusplus 457 } 458 #endif 459 #ifndef HAVE_GETADDRINFO 460 #include "compat/fake-rfc2553.h" 461 #endif 462 #ifndef HAVE_STRTOUL 463 #define strtoul (unsigned long)strtol 464 #endif 465 466