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 <dlfcn.h> header file. */
32 #define HAVE_DLFCN_H 1
34 /* Define to 1 if you have the `endprotoent' function. */
35 #define HAVE_ENDPROTOENT 1
37 /* Define to 1 if you have the `endservent' function. */
38 #define HAVE_ENDSERVENT 1
40 /* Define to 1 if you have the `EVP_sha256' function. */
41 #define HAVE_EVP_SHA256 1
43 /* Define to 1 if you have the `fcntl' function. */
46 /* Whether getaddrinfo is available */
47 #define HAVE_GETADDRINFO 1
49 /* Define to 1 if you have the <getopt.h> header file. */
50 #define HAVE_GETOPT_H 1
52 /* Define to 1 if you have the `gmtime_r' function. */
53 #define HAVE_GMTIME_R 1
55 /* If you have HMAC_CTX_init */
56 #define HAVE_HMAC_CTX_INIT 1
58 /* Define to 1 if you have the `inet_aton' function. */
59 #define HAVE_INET_ATON 1
61 /* Define to 1 if you have the `inet_ntop' function. */
62 #define HAVE_INET_NTOP 1
64 /* Define to 1 if you have the `inet_pton' function. */
65 #define HAVE_INET_PTON 1
67 /* define if you have inttypes.h */
68 #define HAVE_INTTYPES_H 1
70 /* if the function 'ioctlsocket' is available */
71 /* #undef HAVE_IOCTLSOCKET */
73 /* Define to 1 if you have the `isblank' function. */
74 #define HAVE_ISBLANK 1
76 /* Define to 1 if you have the `crypto' library (-lcrypto). */
77 #define HAVE_LIBCRYPTO 1
79 /* Define to 1 if you have the `nsl' library (-lnsl). */
80 /* #undef HAVE_LIBNSL */
82 /* Define to 1 if you have the `socket' library (-lsocket). */
83 /* #undef HAVE_LIBSOCKET */
85 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
89 /* Define to 1 if you have the `memmove' function. */
90 #define HAVE_MEMMOVE 1
92 /* Define to 1 if you have the <memory.h> header file. */
93 #define HAVE_MEMORY_H 1
95 /* Define to 1 if you have the <netdb.h> header file. */
96 #define HAVE_NETDB_H 1
98 /* Define to 1 if you have the <netinet/in.h> header file. */
99 #define HAVE_NETINET_IN_H 1
101 /* Define to 1 if you have the <openssl/err.h> header file. */
102 #define HAVE_OPENSSL_ERR_H 1
104 /* Define to 1 if you have the <openssl/rand.h> header file. */
105 #define HAVE_OPENSSL_RAND_H 1
107 /* Define to 1 if you have the <openssl/ssl.h> header file. */
108 #define HAVE_OPENSSL_SSL_H 1
110 /* Define if you have Python libraries and header files. */
111 /* #undef HAVE_PYTHON */
113 /* Define to 1 if you have the `random' function. */
114 #define HAVE_RANDOM 1
116 /* Define to 1 if your system has a GNU libc compatible `realloc' function,
117 and to 0 otherwise. */
118 #define HAVE_REALLOC 1
120 /* Define to 1 if you have the `sleep' function. */
123 /* Define to 1 if you have the `snprintf' function. */
124 #define HAVE_SNPRINTF 1
126 /* Define if you have the SSL libraries installed. */
127 #define HAVE_SSL /**/
129 /* Define to 1 if you have the <stdarg.h> header file. */
130 #define HAVE_STDARG_H 1
132 /* Define to 1 if you have the <stdbool.h> header file. */
133 #define HAVE_STDBOOL_H 1
135 /* Define to 1 if you have the <stdint.h> header file. */
136 #define HAVE_STDINT_H 1
138 /* Define to 1 if you have the <stdlib.h> header file. */
139 #define HAVE_STDLIB_H 1
141 /* Define to 1 if you have the <strings.h> header file. */
142 #define HAVE_STRINGS_H 1
144 /* Define to 1 if you have the <string.h> header file. */
145 #define HAVE_STRING_H 1
147 /* Define to 1 if you have the `strlcpy' function. */
148 #define HAVE_STRLCPY 1
150 /* Define if you have Swig libraries and header files. */
151 /* #undef HAVE_SWIG */
153 /* Define to 1 if you have the <sys/mount.h> header file. */
154 #define HAVE_SYS_MOUNT_H 1
156 /* Define to 1 if you have the <sys/param.h> header file. */
157 #define HAVE_SYS_PARAM_H 1
159 /* define if you have sys/socket.h */
160 #define HAVE_SYS_SOCKET_H 1
162 /* Define to 1 if you have the <sys/stat.h> header file. */
163 #define HAVE_SYS_STAT_H 1
165 /* Define to 1 if you have the <sys/types.h> header file. */
166 #define HAVE_SYS_TYPES_H 1
168 /* Define to 1 if you have the `timegm' function. */
169 #define HAVE_TIMEGM 1
171 /* Define to 1 if you have the <time.h> header file. */
172 #define HAVE_TIME_H 1
174 /* Define to 1 if you have the <unistd.h> header file. */
175 #define HAVE_UNISTD_H 1
177 /* Define to 1 if you have the <winsock2.h> header file. */
178 /* #undef HAVE_WINSOCK2_H */
180 /* Define to 1 if you have the <ws2tcpip.h> header file. */
181 /* #undef HAVE_WS2TCPIP_H */
183 /* Define to the sub-directory in which libtool stores uninstalled libraries.
185 #define LT_OBJDIR ".libs/"
187 /* Define to the address where bug reports for this package should be sent. */
188 #define PACKAGE_BUGREPORT "libdns@nlnetlabs.nl"
190 /* Define to the full name of this package. */
191 #define PACKAGE_NAME "ldns"
193 /* Define to the full name and version of this package. */
194 #define PACKAGE_STRING "ldns 1.6.4"
196 /* Define to the one symbol short name of this package. */
197 #define PACKAGE_TARNAME "libdns"
199 /* Define to the version of this package. */
200 #define PACKAGE_VERSION "1.6.4"
202 /* Define to 1 if you have the ANSI C header files. */
203 #define STDC_HEADERS 1
205 /* System configuration dir */
206 #define SYSCONFDIR sysconfdir
208 /* Define this to enable GOST support. */
209 /* #undef USE_GOST */
211 /* Define this to enable SHA256 and SHA512 support. */
214 /* Enable extensions on AIX 3, Interix. */
216 # define _ALL_SOURCE 1
218 /* Enable GNU extensions on systems that have them. */
220 # define _GNU_SOURCE 1
222 /* Enable threading extensions on Solaris. */
223 #ifndef _POSIX_PTHREAD_SEMANTICS
224 # define _POSIX_PTHREAD_SEMANTICS 1
226 /* Enable extensions on HP NonStop. */
227 #ifndef _TANDEM_SOURCE
228 # define _TANDEM_SOURCE 1
230 /* Enable general extensions on Solaris. */
231 #ifndef __EXTENSIONS__
232 # define __EXTENSIONS__ 1
236 /* Whether the windows socket API is used */
237 /* #undef USE_WINSOCK */
239 /* the version of the windows API enabled */
240 #define WINVER 0x0502
242 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
243 significant byte first (like Motorola and SPARC, unlike Intel). */
244 #if defined AC_APPLE_UNIVERSAL_BUILD
245 # if defined __BIG_ENDIAN__
246 # define WORDS_BIGENDIAN 1
249 # ifndef WORDS_BIGENDIAN
250 /* # undef WORDS_BIGENDIAN */
254 /* Define to 1 if on MINIX. */
257 /* Define to 2 if the system does not provide POSIX.1 features except with
259 /* #undef _POSIX_1_SOURCE */
261 /* Define to 1 if you need to in order for `stat' and other things to work. */
262 /* #undef _POSIX_SOURCE */
264 /* Define to empty if `const' does not conform to ANSI C. */
268 /* #undef in_addr_t */
271 /* #undef in_port_t */
273 /* Define to `__inline__' or `__inline' if that's what the C compiler
274 calls it, or to nothing if 'inline' is not supported under any name. */
279 /* Define to `short' if <sys/types.h> does not define. */
282 /* Define to `int' if <sys/types.h> does not define. */
285 /* Define to `long long' if <sys/types.h> does not define. */
288 /* Define to `char' if <sys/types.h> does not define. */
291 /* Define to rpl_malloc if the replacement function should be used. */
294 /* Define to rpl_realloc if the replacement function should be used. */
297 /* Define to 'int' if not defined */
298 /* #undef socklen_t */
300 /* Define to `int' if <sys/types.h> does not define. */
303 /* Define to `unsigned short' if <sys/types.h> does not define. */
304 /* #undef uint16_t */
306 /* Define to `unsigned int' if <sys/types.h> does not define. */
307 /* #undef uint32_t */
309 /* Define to `unsigned long long' if <sys/types.h> does not define. */
310 /* #undef uint64_t */
312 /* Define to `unsigned char' if <sys/types.h> does not define. */
321 #ifndef LITTLE_ENDIAN
322 #define LITTLE_ENDIAN 1234
326 #define BIG_ENDIAN 4321
330 #ifdef WORDS_BIGENDIAN
331 #define BYTE_ORDER BIG_ENDIAN
333 #define BYTE_ORDER LITTLE_ENDIAN
334 #endif /* WORDS_BIGENDIAN */
335 #endif /* BYTE_ORDER */
346 #ifdef HAVE_SYS_SOCKET_H
347 #include <sys/socket.h>
350 #ifdef HAVE_NETINET_IN_H
351 #include <netinet/in.h>
354 #ifdef HAVE_ARPA_INET_H
355 #include <arpa/inet.h>
358 #ifdef HAVE_WINSOCK2_H
359 #include <winsock2.h>
362 #ifdef HAVE_WS2TCPIP_H
363 #include <ws2tcpip.h>
367 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
368 #ifdef HAVE_WINSOCK2_H
369 #define FD_SET_T (u_int)
378 int ldns_b64_ntop(uint8_t const *src, size_t srclength,
379 char *target, size_t targsize);
381 * calculates the size needed to store the result of b64_ntop
384 static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
386 return ((((srcsize + 2) / 3) * 4) + 1);
388 #endif /* !B64_PTON */
390 int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
392 * calculates the size needed to store the result of ldns_b64_pton
395 static inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
397 return ((((srcsize / 4) * 3) - 2) + 2);
399 #endif /* !B64_NTOP */
402 /* use windows sleep, in millisecs, instead */
403 #define sleep(x) Sleep((x)*1000)
407 #define srandom(x) srand(x)
408 #define random(x) rand(x)
413 time_t timegm (struct tm *tm);
415 #ifndef HAVE_GMTIME_R
416 struct tm *gmtime_r(const time_t *timep, struct tm *result);
420 #endif /* !HAVE_ISBLANK */
421 #ifndef HAVE_SNPRINTF
423 int snprintf (char *str, size_t count, const char *fmt, ...);
424 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
425 #endif /* HAVE_SNPRINTF */
426 #ifndef HAVE_INET_PTON
427 int inet_pton(int af, const char* src, void* dst);
428 #endif /* HAVE_INET_PTON */
429 #ifndef HAVE_INET_NTOP
430 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
432 #ifndef HAVE_INET_ATON
433 int inet_aton(const char *cp, struct in_addr *addr);
436 void *memmove(void *dest, const void *src, size_t n);
439 size_t strlcpy(char *dst, const char *src, size_t siz);
441 #ifndef HAVE_GETADDRINFO
442 #include "compat/fake-rfc2553.h"