1 /* ldns/config.h.in. Generated from configure.ac by autoheader. */
3 /* Define if building universal (internal helper macro) */
4 #undef AC_APPLE_UNIVERSAL_BUILD
6 /* Define to 1 if you have the <arpa/inet.h> header file. */
7 #undef HAVE_ARPA_INET_H
9 /* Whether the C compiler accepts the "format" attribute */
10 #undef HAVE_ATTR_FORMAT
12 /* Whether the C compiler accepts the "unused" attribute */
13 #undef HAVE_ATTR_UNUSED
15 /* Define to 1 if you have the `b32_ntop' function. */
18 /* Define to 1 if you have the `b32_pton' function. */
21 /* Define to 1 if you have the `b64_ntop' function. */
24 /* Define to 1 if you have the `b64_pton' function. */
27 /* Define to 1 if you have the `bzero' function. */
30 /* Define to 1 if you have the `calloc' function. */
33 /* Define to 1 if you have the `ctime_r' function. */
36 /* Is a CAFILE given at configure time */
37 #undef HAVE_DANE_CA_FILE
39 /* Is a CAPATH given at configure time */
40 #undef HAVE_DANE_CA_PATH
42 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
44 #undef HAVE_DECL_NID_SECP384R1
46 /* Define to 1 if you have the declaration of `NID_X25519', and to 0 if you
48 #undef HAVE_DECL_NID_X25519
50 /* Define to 1 if you have the declaration of `NID_X448', and to 0 if you
52 #undef HAVE_DECL_NID_X448
54 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
56 #undef HAVE_DECL_NID_X9_62_PRIME256V1
58 /* Define to 1 if you have the <dlfcn.h> header file. */
61 /* Define to 1 if you have the `DSA_get0_key' function. */
62 #undef HAVE_DSA_GET0_KEY
64 /* Define to 1 if you have the `DSA_get0_pqg' function. */
65 #undef HAVE_DSA_GET0_PQG
67 /* Define to 1 if you have the `DSA_SIG_get0' function. */
68 #undef HAVE_DSA_SIG_GET0
70 /* Define to 1 if you have the `DSA_SIG_set0' function. */
71 #undef HAVE_DSA_SIG_SET0
73 /* Define to 1 if you have the `ECDSA_SIG_get0' function. */
74 #undef HAVE_ECDSA_SIG_GET0
76 /* Define to 1 if you have the `endprotoent' function. */
77 #undef HAVE_ENDPROTOENT
79 /* Define to 1 if you have the `endservent' function. */
80 #undef HAVE_ENDSERVENT
82 /* Define to 1 if you have the `ENGINE_load_cryptodev' function. */
83 #undef HAVE_ENGINE_LOAD_CRYPTODEV
85 /* Define to 1 if you have the `EVP_dss1' function. */
88 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
89 #undef HAVE_EVP_MD_CTX_NEW
91 /* Define to 1 if you have the `EVP_PKEY_base_id' function. */
92 #undef HAVE_EVP_PKEY_BASE_ID
94 /* Define to 1 if you have the `EVP_PKEY_keygen' function. */
95 #undef HAVE_EVP_PKEY_KEYGEN
97 /* Define to 1 if you have the `EVP_sha256' function. */
98 #undef HAVE_EVP_SHA256
100 /* Define to 1 if you have the `EVP_sha384' function. */
101 #undef HAVE_EVP_SHA384
103 /* Define to 1 if you have the `EVP_sha512' function. */
104 #undef HAVE_EVP_SHA512
106 /* Define to 1 if you have the `fcntl' function. */
109 /* Define to 1 if you have the `fork' function. */
112 /* Whether getaddrinfo is available */
113 #undef HAVE_GETADDRINFO
115 /* Define to 1 if you have the <getopt.h> header file. */
118 /* Define to 1 if you have the `gmtime_r' function. */
121 /* If you have HMAC_Update */
122 #undef HAVE_HMAC_UPDATE
124 /* Define to 1 if you have the `inet_aton' function. */
125 #undef HAVE_INET_ATON
127 /* Define to 1 if you have the `inet_ntop' function. */
128 #undef HAVE_INET_NTOP
130 /* Define to 1 if you have the `inet_pton' function. */
131 #undef HAVE_INET_PTON
133 /* define if you have inttypes.h */
134 #undef HAVE_INTTYPES_H
136 /* if the function 'ioctlsocket' is available */
137 #undef HAVE_IOCTLSOCKET
139 /* Define to 1 if you have the `isascii' function. */
142 /* Define to 1 if you have the `isblank' function. */
145 /* Define to 1 if you have the `pcap' library (-lpcap). */
148 /* Define if we have LibreSSL */
151 /* Define to 1 if you have the `localtime_r' function. */
152 #undef HAVE_LOCALTIME_R
154 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
158 /* Define to 1 if you have the `memmove' function. */
161 /* Define to 1 if you have the <memory.h> header file. */
164 /* Define to 1 if you have the `memset' function. */
167 /* Define to 1 if you have the <netdb.h> header file. */
170 /* Define to 1 if you have the <netinet/if_ether.h> header file. */
171 #undef HAVE_NETINET_IF_ETHER_H
173 /* Define to 1 if you have the <netinet/igmp.h> header file. */
174 #undef HAVE_NETINET_IGMP_H
176 /* Define to 1 if you have the <netinet/in.h> header file. */
177 #undef HAVE_NETINET_IN_H
179 /* Define to 1 if you have the <netinet/in_systm.h> header file. */
180 #undef HAVE_NETINET_IN_SYSTM_H
182 /* Define to 1 if you have the <netinet/ip6.h> header file. */
183 #undef HAVE_NETINET_IP6_H
185 /* Define to 1 if you have the <netinet/ip_compat.h> header file. */
186 #undef HAVE_NETINET_IP_COMPAT_H
188 /* Define to 1 if you have the <netinet/ip.h> header file. */
189 #undef HAVE_NETINET_IP_H
191 /* Define to 1 if you have the <netinet/udp.h> header file. */
192 #undef HAVE_NETINET_UDP_H
194 /* Define to 1 if you have the <net/ethernet.h> header file. */
195 #undef HAVE_NET_ETHERNET_H
197 /* Define to 1 if you have the <net/if.h> header file. */
200 /* Define to 1 if you have the <openssl/err.h> header file. */
201 #undef HAVE_OPENSSL_ERR_H
203 /* Define to 1 if you have the <openssl/rand.h> header file. */
204 #undef HAVE_OPENSSL_RAND_H
206 /* Define to 1 if you have the <openssl/ssl.h> header file. */
207 #undef HAVE_OPENSSL_SSL_H
209 /* Define to 1 if you have the <pcap.h> header file. */
212 /* This platform supports poll(7). */
215 /* If available, contains the Python version number currently in use. */
218 /* Define to 1 if you have the `random' function. */
221 /* Define to 1 if your system has a GNU libc compatible `realloc' function,
222 and to 0 otherwise. */
225 /* Define to 1 if you have the `sleep' function. */
228 /* Define to 1 if you have the `snprintf' function. */
231 /* Define if you have the SSL libraries installed. */
234 /* Define to 1 if you have the <stdarg.h> header file. */
237 /* Define to 1 if stdbool.h conforms to C99. */
238 #undef HAVE_STDBOOL_H
240 /* Define to 1 if you have the <stdint.h> header file. */
243 /* Define to 1 if you have the <stdlib.h> header file. */
246 /* Define to 1 if you have the <strings.h> header file. */
247 #undef HAVE_STRINGS_H
249 /* Define to 1 if you have the <string.h> header file. */
252 /* Define to 1 if you have the `strlcpy' function. */
255 /* Define to 1 if you have the `strtoul' function. */
258 /* Define if you have SWIG libraries and header files. */
261 /* Define to 1 if you have the <sys/mount.h> header file. */
262 #undef HAVE_SYS_MOUNT_H
264 /* Define to 1 if you have the <sys/param.h> header file. */
265 #undef HAVE_SYS_PARAM_H
267 /* define if you have sys/socket.h */
268 #undef HAVE_SYS_SOCKET_H
270 /* Define to 1 if you have the <sys/stat.h> header file. */
271 #undef HAVE_SYS_STAT_H
273 /* define if you have sys/types.h */
274 #undef HAVE_SYS_TYPES_H
276 /* Define to 1 if you have the `timegm' function. */
279 /* Define to 1 if you have the <time.h> header file. */
282 /* define if you have unistd.h */
285 /* Define to 1 if you have the `vfork' function. */
288 /* Define to 1 if you have the <vfork.h> header file. */
291 /* Define to 1 if you have the <winsock2.h> header file. */
292 #undef HAVE_WINSOCK2_H
294 /* Define to 1 if `fork' works. */
295 #undef HAVE_WORKING_FORK
297 /* Define to 1 if `vfork' works. */
298 #undef HAVE_WORKING_VFORK
300 /* Define to 1 if you have the <ws2tcpip.h> header file. */
301 #undef HAVE_WS2TCPIP_H
303 /* Define to 1 if the system has the type `_Bool'. */
306 /* Is a CAFILE given at configure time */
307 #undef LDNS_DANE_CA_FILE
309 /* Is a CAPATH given at configure time */
310 #undef LDNS_DANE_CA_PATH
312 /* Define to the sub-directory where libtool stores uninstalled libraries. */
315 /* Define to the address where bug reports for this package should be sent. */
316 #undef PACKAGE_BUGREPORT
318 /* Define to the full name of this package. */
321 /* Define to the full name and version of this package. */
322 #undef PACKAGE_STRING
324 /* Define to the one symbol short name of this package. */
325 #undef PACKAGE_TARNAME
327 /* Define to the home page for this package. */
330 /* Define to the version of this package. */
331 #undef PACKAGE_VERSION
333 /* Define this to enable RR type AVC. */
336 /* Define this to enable RR type NINFO. */
339 /* Define this to enable RR type OPENPGPKEY. */
340 #undef RRTYPE_OPENPGPKEY
342 /* Define this to enable RR type RKEY. */
345 /* Define this to enable RR type TA. */
348 /* The size of `time_t', as computed by sizeof. */
351 /* Define to 1 if you have the ANSI C header files. */
354 /* Define this to enable messages to stderr. */
357 /* System configuration dir */
360 /* Define this to enable DANE support. */
363 /* Define this to enable DANE-TA usage type support. */
364 #undef USE_DANE_TA_USAGE
366 /* Define this to enable DANE verify support. */
367 #undef USE_DANE_VERIFY
369 /* Define this to enable DSA support. */
372 /* Define this to enable ECDSA support. */
375 /* Define this to enable ED25519 support. */
378 /* Define this to enable ED448 support. */
381 /* Define this to enable GOST support. */
384 /* Define this to enable SHA256 and SHA512 support. */
387 /* Enable extensions on AIX 3, Interix. */
391 /* Enable GNU extensions on systems that have them. */
395 /* Enable threading extensions on Solaris. */
396 #ifndef _POSIX_PTHREAD_SEMANTICS
397 # undef _POSIX_PTHREAD_SEMANTICS
399 /* Enable extensions on HP NonStop. */
400 #ifndef _TANDEM_SOURCE
401 # undef _TANDEM_SOURCE
403 /* Enable general extensions on Solaris. */
404 #ifndef __EXTENSIONS__
405 # undef __EXTENSIONS__
409 /* Whether the windows socket API is used */
412 /* the version of the windows API enabled */
415 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
416 significant byte first (like Motorola and SPARC, unlike Intel). */
417 #if defined AC_APPLE_UNIVERSAL_BUILD
418 # if defined __BIG_ENDIAN__
419 # define WORDS_BIGENDIAN 1
422 # ifndef WORDS_BIGENDIAN
423 # undef WORDS_BIGENDIAN
427 /* Define to 1 if on MINIX. */
430 /* Enable for compile on Minix */
431 #undef _NETBSD_SOURCE
433 /* Define to 2 if the system does not provide POSIX.1 features except with
435 #undef _POSIX_1_SOURCE
437 /* Define to 1 if you need to in order for `stat' and other things to work. */
440 /* Define to empty if `const' does not conform to ANSI C. */
449 /* Define to `__inline__' or `__inline' if that's what the C compiler
450 calls it, or to nothing if 'inline' is not supported under any name. */
455 /* Define to `short' if <sys/types.h> does not define. */
458 /* Define to `int' if <sys/types.h> does not define. */
461 /* Define to `long long' if <sys/types.h> does not define. */
464 /* Define to `char' if <sys/types.h> does not define. */
467 /* Define to `size_t' if <sys/types.h> does not define. */
470 /* Define to rpl_malloc if the replacement function should be used. */
473 /* Define to `int' if <sys/types.h> does not define. */
476 /* Define to rpl_realloc if the replacement function should be used. */
479 /* Define to `unsigned int' if <sys/types.h> does not define. */
482 /* Define to 'int' if not defined */
485 /* Fallback member name for socket family in struct sockaddr_storage */
488 /* Define to `int' if <sys/types.h> does not define. */
491 /* Define to `unsigned short' if <sys/types.h> does not define. */
494 /* Define to `unsigned int' if <sys/types.h> does not define. */
497 /* Define to `unsigned long long' if <sys/types.h> does not define. */
500 /* Define to `unsigned char' if <sys/types.h> does not define. */
503 /* Define as `fork' if `vfork' does not work. */
512 #ifndef LITTLE_ENDIAN
513 #define LITTLE_ENDIAN 1234
517 #define BIG_ENDIAN 4321
521 #ifdef WORDS_BIGENDIAN
522 #define BYTE_ORDER BIG_ENDIAN
524 #define BYTE_ORDER LITTLE_ENDIAN
525 #endif /* WORDS_BIGENDIAN */
526 #endif /* BYTE_ORDER */
537 #ifdef HAVE_SYS_SOCKET_H
538 #include <sys/socket.h>
541 #ifdef HAVE_NETINET_IN_H
542 #include <netinet/in.h>
545 #ifdef HAVE_ARPA_INET_H
546 #include <arpa/inet.h>
549 #ifdef HAVE_WINSOCK2_H
550 #include <winsock2.h>
553 #ifdef HAVE_WS2TCPIP_H
554 #include <ws2tcpip.h>
558 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
559 #ifdef HAVE_WINSOCK2_H
560 #define FD_SET_T (u_int)
572 int ldns_b64_ntop(uint8_t const *src, size_t srclength,
573 char *target, size_t targsize);
575 * calculates the size needed to store the result of b64_ntop
578 static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
580 return ((((srcsize + 2) / 3) * 4) + 1);
582 int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
584 * calculates the size needed to store the result of ldns_b64_pton
587 static inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
589 return (((((srcsize + 3) / 4) * 3)) + 1);
593 * Given in dnssec_zone.c, also used in dnssec_sign.c:w
596 int ldns_dname_compare_v(const void *a, const void *b);
599 /* use windows sleep, in millisecs, instead */
600 #define sleep(x) Sleep((x)*1000)
604 #define srandom(x) srand(x)
605 #define random(x) rand(x)
610 time_t timegm (struct tm *tm);
612 #ifndef HAVE_GMTIME_R
613 struct tm *gmtime_r(const time_t *timep, struct tm *result);
615 #ifndef HAVE_LOCALTIME_R
616 struct tm *localtime_r(const time_t *timep, struct tm *result);
620 #endif /* !HAVE_ISBLANK */
623 #endif /* !HAVE_ISASCII */
624 #ifndef HAVE_SNPRINTF
626 int snprintf (char *str, size_t count, const char *fmt, ...);
627 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
628 #endif /* HAVE_SNPRINTF */
629 #ifndef HAVE_INET_PTON
630 int inet_pton(int af, const char* src, void* dst);
631 #endif /* HAVE_INET_PTON */
632 #ifndef HAVE_INET_NTOP
633 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
635 #ifndef HAVE_INET_ATON
636 int inet_aton(const char *cp, struct in_addr *addr);
639 void *memmove(void *dest, const void *src, size_t n);
642 size_t strlcpy(char *dst, const char *src, size_t siz);
646 #define SOCK_INVALID INVALID_SOCKET
647 #define close_socket(_s) do { if (_s > SOCK_INVALID) {closesocket(_s); _s = SOCK_INVALID;} } while(0)
649 #define SOCK_INVALID -1
650 #define close_socket(_s) do { if (_s > SOCK_INVALID) {close(_s); _s = SOCK_INVALID;} } while(0)
656 #ifndef HAVE_GETADDRINFO
657 #include "compat/fake-rfc2553.h"
660 #define strtoul (unsigned long)strtol