1 /* ldns/config.h. Generated from config.h.in by configure. */
2 /* ldns/config.h.in. Generated from configure.ac by autoheader. */
4 /* Define if building universal (internal helper macro) */
5 /* #undef AC_APPLE_UNIVERSAL_BUILD */
7 /* Define to 1 if you have the <arpa/inet.h> header file. */
8 #define HAVE_ARPA_INET_H 1
10 /* Whether the C compiler accepts the "format" attribute */
11 #define HAVE_ATTR_FORMAT 1
13 /* Whether the C compiler accepts the "unused" attribute */
14 #define HAVE_ATTR_UNUSED 1
16 /* Define to 1 if you have the `b32_ntop' function. */
17 /* #undef HAVE_B32_NTOP */
19 /* Define to 1 if you have the `b32_pton' function. */
20 /* #undef HAVE_B32_PTON */
22 /* Define to 1 if you have the `b64_ntop' function. */
23 /* #undef HAVE_B64_NTOP */
25 /* Define to 1 if you have the `b64_pton' function. */
26 /* #undef HAVE_B64_PTON */
28 /* Define to 1 if you have the `ctime_r' function. */
29 #define HAVE_CTIME_R 1
31 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
33 /* #undef HAVE_DECL_NID_SECP384R1 */
35 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
37 /* #undef HAVE_DECL_NID_X9_62_PRIME256V1 */
39 /* Define to 1 if you have the <dlfcn.h> header file. */
40 #define HAVE_DLFCN_H 1
42 /* Define to 1 if you have the `endprotoent' function. */
43 #define HAVE_ENDPROTOENT 1
45 /* Define to 1 if you have the `endservent' function. */
46 #define HAVE_ENDSERVENT 1
48 /* Define to 1 if you have the `EVP_sha256' function. */
49 #define HAVE_EVP_SHA256 1
51 /* Define to 1 if you have the `fcntl' function. */
54 /* Whether getaddrinfo is available */
55 #define HAVE_GETADDRINFO 1
57 /* Define to 1 if you have the <getopt.h> header file. */
58 #define HAVE_GETOPT_H 1
60 /* Define to 1 if you have the `gmtime_r' function. */
61 #define HAVE_GMTIME_R 1
63 /* If you have HMAC_CTX_init */
64 #define HAVE_HMAC_CTX_INIT 1
66 /* Define to 1 if you have the `inet_aton' function. */
67 #define HAVE_INET_ATON 1
69 /* Define to 1 if you have the `inet_ntop' function. */
70 #define HAVE_INET_NTOP 1
72 /* Define to 1 if you have the `inet_pton' function. */
73 #define HAVE_INET_PTON 1
75 /* define if you have inttypes.h */
76 #define HAVE_INTTYPES_H 1
78 /* if the function 'ioctlsocket' is available */
79 /* #undef HAVE_IOCTLSOCKET */
81 /* Define to 1 if you have the `isascii' function. */
82 #define HAVE_ISASCII 1
84 /* Define to 1 if you have the `isblank' function. */
85 #define HAVE_ISBLANK 1
87 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
91 /* Define to 1 if you have the `memmove' function. */
92 #define HAVE_MEMMOVE 1
94 /* Define to 1 if you have the <memory.h> header file. */
95 #define HAVE_MEMORY_H 1
97 /* Define to 1 if you have the <netdb.h> header file. */
98 #define HAVE_NETDB_H 1
100 /* Define to 1 if you have the <netinet/in.h> header file. */
101 #define HAVE_NETINET_IN_H 1
103 /* Define to 1 if you have the <openssl/err.h> header file. */
104 #define HAVE_OPENSSL_ERR_H 1
106 /* Define to 1 if you have the <openssl/rand.h> header file. */
107 #define HAVE_OPENSSL_RAND_H 1
109 /* Define to 1 if you have the <openssl/ssl.h> header file. */
110 #define HAVE_OPENSSL_SSL_H 1
112 /* Define if you have Python libraries and header files. */
113 /* #undef HAVE_PYTHON */
115 /* Define to 1 if you have the `random' function. */
116 #define HAVE_RANDOM 1
118 /* Define to 1 if your system has a GNU libc compatible `realloc' function,
119 and to 0 otherwise. */
120 #define HAVE_REALLOC 1
122 /* Define to 1 if you have the `sleep' function. */
125 /* Define to 1 if you have the `snprintf' function. */
126 #define HAVE_SNPRINTF 1
128 /* Define if you have the SSL libraries installed. */
129 #define HAVE_SSL /**/
131 /* Define to 1 if you have the <stdarg.h> header file. */
132 #define HAVE_STDARG_H 1
134 /* Define to 1 if you have the <stdbool.h> header file. */
135 #define HAVE_STDBOOL_H 1
137 /* Define to 1 if you have the <stdint.h> header file. */
138 #define HAVE_STDINT_H 1
140 /* Define to 1 if you have the <stdlib.h> header file. */
141 #define HAVE_STDLIB_H 1
143 /* Define to 1 if you have the <strings.h> header file. */
144 #define HAVE_STRINGS_H 1
146 /* Define to 1 if you have the <string.h> header file. */
147 #define HAVE_STRING_H 1
149 /* Define to 1 if you have the `strlcpy' function. */
150 #define HAVE_STRLCPY 1
152 /* Define to 1 if you have the `strtoul' function. */
153 #define HAVE_STRTOUL 1
155 /* Define if you have Swig libraries and header files. */
156 /* #undef HAVE_SWIG */
158 /* Define to 1 if you have the <sys/mount.h> header file. */
159 #define HAVE_SYS_MOUNT_H 1
161 /* Define to 1 if you have the <sys/param.h> header file. */
162 #define HAVE_SYS_PARAM_H 1
164 /* define if you have sys/socket.h */
165 #define HAVE_SYS_SOCKET_H 1
167 /* Define to 1 if you have the <sys/stat.h> header file. */
168 #define HAVE_SYS_STAT_H 1
170 /* define if you have sys/types.h */
171 #define HAVE_SYS_TYPES_H 1
173 /* Define to 1 if you have the `timegm' function. */
174 #define HAVE_TIMEGM 1
176 /* Define to 1 if you have the <time.h> header file. */
177 #define HAVE_TIME_H 1
179 /* define if you have unistd.h */
180 #define HAVE_UNISTD_H 1
182 /* Define to 1 if you have the <winsock2.h> header file. */
183 /* #undef HAVE_WINSOCK2_H */
185 /* Define to 1 if you have the <ws2tcpip.h> header file. */
186 /* #undef HAVE_WS2TCPIP_H */
188 /* Define to the sub-directory in which libtool stores uninstalled libraries.
190 #define LT_OBJDIR ".libs/"
192 /* Define to the address where bug reports for this package should be sent. */
193 #define PACKAGE_BUGREPORT "libdns@nlnetlabs.nl"
195 /* Define to the full name of this package. */
196 #define PACKAGE_NAME "ldns"
198 /* Define to the full name and version of this package. */
199 #define PACKAGE_STRING "ldns 1.6.9"
201 /* Define to the one symbol short name of this package. */
202 #define PACKAGE_TARNAME "libdns"
204 /* Define to the home page for this package. */
205 #define PACKAGE_URL ""
207 /* Define to the version of this package. */
208 #define PACKAGE_VERSION "1.6.9"
210 /* Define to 1 if you have the ANSI C header files. */
211 #define STDC_HEADERS 1
213 /* System configuration dir */
214 #define SYSCONFDIR sysconfdir
216 /* Define this to enable ECDSA support. */
217 /* #undef USE_ECDSA */
219 /* Define this to enable GOST support. */
222 /* Define this to enable SHA256 and SHA512 support. */
225 /* Enable extensions on AIX 3, Interix. */
227 # define _ALL_SOURCE 1
229 /* Enable GNU extensions on systems that have them. */
231 # define _GNU_SOURCE 1
233 /* Enable threading extensions on Solaris. */
234 #ifndef _POSIX_PTHREAD_SEMANTICS
235 # define _POSIX_PTHREAD_SEMANTICS 1
237 /* Enable extensions on HP NonStop. */
238 #ifndef _TANDEM_SOURCE
239 # define _TANDEM_SOURCE 1
241 /* Enable general extensions on Solaris. */
242 #ifndef __EXTENSIONS__
243 # define __EXTENSIONS__ 1
247 /* Whether the windows socket API is used */
248 /* #undef USE_WINSOCK */
250 /* the version of the windows API enabled */
251 #define WINVER 0x0502
253 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
254 significant byte first (like Motorola and SPARC, unlike Intel). */
255 #if defined AC_APPLE_UNIVERSAL_BUILD
256 # if defined __BIG_ENDIAN__
257 # define WORDS_BIGENDIAN 1
260 # ifndef WORDS_BIGENDIAN
261 /* # undef WORDS_BIGENDIAN */
265 /* Define to 1 if on MINIX. */
268 /* Define to 2 if the system does not provide POSIX.1 features except with
270 /* #undef _POSIX_1_SOURCE */
272 /* Define to 1 if you need to in order for `stat' and other things to work. */
273 /* #undef _POSIX_SOURCE */
275 /* Define to empty if `const' does not conform to ANSI C. */
279 /* #undef in_addr_t */
282 /* #undef in_port_t */
284 /* Define to `__inline__' or `__inline' if that's what the C compiler
285 calls it, or to nothing if 'inline' is not supported under any name. */
290 /* Define to `short' if <sys/types.h> does not define. */
293 /* Define to `int' if <sys/types.h> does not define. */
296 /* Define to `long long' if <sys/types.h> does not define. */
299 /* Define to `char' if <sys/types.h> does not define. */
302 /* Define to rpl_malloc if the replacement function should be used. */
305 /* Define to rpl_realloc if the replacement function should be used. */
308 /* Define to 'int' if not defined */
309 /* #undef socklen_t */
311 /* Fallback member name for socket family in struct sockaddr_storage */
312 /* #undef ss_family */
314 /* Define to `int' if <sys/types.h> does not define. */
317 /* Define to `unsigned short' if <sys/types.h> does not define. */
318 /* #undef uint16_t */
320 /* Define to `unsigned int' if <sys/types.h> does not define. */
321 /* #undef uint32_t */
323 /* Define to `unsigned long long' if <sys/types.h> does not define. */
324 /* #undef uint64_t */
326 /* Define to `unsigned char' if <sys/types.h> does not define. */
335 #ifndef LITTLE_ENDIAN
336 #define LITTLE_ENDIAN 1234
340 #define BIG_ENDIAN 4321
344 #ifdef WORDS_BIGENDIAN
345 #define BYTE_ORDER BIG_ENDIAN
347 #define BYTE_ORDER LITTLE_ENDIAN
348 #endif /* WORDS_BIGENDIAN */
349 #endif /* BYTE_ORDER */
360 #ifdef HAVE_SYS_SOCKET_H
361 #include <sys/socket.h>
364 #ifdef HAVE_NETINET_IN_H
365 #include <netinet/in.h>
368 #ifdef HAVE_ARPA_INET_H
369 #include <arpa/inet.h>
372 #ifdef HAVE_WINSOCK2_H
373 #include <winsock2.h>
376 #ifdef HAVE_WS2TCPIP_H
377 #include <ws2tcpip.h>
381 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
382 #ifdef HAVE_WINSOCK2_H
383 #define FD_SET_T (u_int)
396 int ldns_b64_ntop(uint8_t const *src, size_t srclength,
397 char *target, size_t targsize);
399 * calculates the size needed to store the result of b64_ntop
402 static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
404 return ((((srcsize + 2) / 3) * 4) + 1);
406 #endif /* !B64_PTON */
408 int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
410 * calculates the size needed to store the result of ldns_b64_pton
413 static inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
415 return (((((srcsize + 3) / 4) * 3)) + 1);
417 #endif /* !B64_NTOP */
420 /* use windows sleep, in millisecs, instead */
421 #define sleep(x) Sleep((x)*1000)
425 #define srandom(x) srand(x)
426 #define random(x) rand(x)
431 time_t timegm (struct tm *tm);
433 #ifndef HAVE_GMTIME_R
434 struct tm *gmtime_r(const time_t *timep, struct tm *result);
438 #endif /* !HAVE_ISBLANK */
441 #endif /* !HAVE_ISASCII */
442 #ifndef HAVE_SNPRINTF
444 int snprintf (char *str, size_t count, const char *fmt, ...);
445 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
446 #endif /* HAVE_SNPRINTF */
447 #ifndef HAVE_INET_PTON
448 int inet_pton(int af, const char* src, void* dst);
449 #endif /* HAVE_INET_PTON */
450 #ifndef HAVE_INET_NTOP
451 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
453 #ifndef HAVE_INET_ATON
454 int inet_aton(const char *cp, struct in_addr *addr);
457 void *memmove(void *dest, const void *src, size_t n);
460 size_t strlcpy(char *dst, const char *src, size_t siz);
465 #ifndef HAVE_GETADDRINFO
466 #include "compat/fake-rfc2553.h"
469 #define strtoul (unsigned long)strtol