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 `ctime_r' function. */
30 /* Define to 1 if you have the <dlfcn.h> header file. */
33 /* Define to 1 if you have the `endprotoent' function. */
34 #undef HAVE_ENDPROTOENT
36 /* Define to 1 if you have the `endservent' function. */
37 #undef HAVE_ENDSERVENT
39 /* Define to 1 if you have the `EVP_sha256' function. */
40 #undef HAVE_EVP_SHA256
42 /* Define to 1 if you have the `fcntl' function. */
45 /* Whether getaddrinfo is available */
46 #undef HAVE_GETADDRINFO
48 /* Define to 1 if you have the <getopt.h> header file. */
51 /* Define to 1 if you have the `gmtime_r' function. */
54 /* If you have HMAC_CTX_init */
55 #undef HAVE_HMAC_CTX_INIT
57 /* Define to 1 if you have the `inet_aton' function. */
60 /* Define to 1 if you have the `inet_ntop' function. */
63 /* Define to 1 if you have the `inet_pton' function. */
66 /* define if you have inttypes.h */
67 #undef HAVE_INTTYPES_H
69 /* if the function 'ioctlsocket' is available */
70 #undef HAVE_IOCTLSOCKET
72 /* Define to 1 if you have the `isblank' function. */
75 /* Define to 1 if you have the `crypto' library (-lcrypto). */
78 /* Define to 1 if you have the `nsl' library (-lnsl). */
81 /* Define to 1 if you have the `socket' library (-lsocket). */
84 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
88 /* Define to 1 if you have the `memmove' function. */
91 /* Define to 1 if you have the <memory.h> header file. */
94 /* Define to 1 if you have the <netdb.h> header file. */
97 /* Define to 1 if you have the <netinet/in.h> header file. */
98 #undef HAVE_NETINET_IN_H
100 /* Define to 1 if you have the <openssl/err.h> header file. */
101 #undef HAVE_OPENSSL_ERR_H
103 /* Define to 1 if you have the <openssl/rand.h> header file. */
104 #undef HAVE_OPENSSL_RAND_H
106 /* Define to 1 if you have the <openssl/ssl.h> header file. */
107 #undef HAVE_OPENSSL_SSL_H
109 /* Define if you have Python libraries and header files. */
112 /* Define to 1 if you have the `random' function. */
115 /* Define to 1 if your system has a GNU libc compatible `realloc' function,
116 and to 0 otherwise. */
119 /* Define to 1 if you have the `sleep' function. */
122 /* Define to 1 if you have the `snprintf' function. */
125 /* Define if you have the SSL libraries installed. */
128 /* Define to 1 if you have the <stdarg.h> header file. */
131 /* Define to 1 if you have the <stdbool.h> header file. */
132 #undef HAVE_STDBOOL_H
134 /* Define to 1 if you have the <stdint.h> header file. */
137 /* Define to 1 if you have the <stdlib.h> header file. */
140 /* Define to 1 if you have the <strings.h> header file. */
141 #undef HAVE_STRINGS_H
143 /* Define to 1 if you have the <string.h> header file. */
146 /* Define to 1 if you have the `strlcpy' function. */
149 /* Define if you have Swig libraries and header files. */
152 /* Define to 1 if you have the <sys/mount.h> header file. */
153 #undef HAVE_SYS_MOUNT_H
155 /* Define to 1 if you have the <sys/param.h> header file. */
156 #undef HAVE_SYS_PARAM_H
158 /* define if you have sys/socket.h */
159 #undef HAVE_SYS_SOCKET_H
161 /* Define to 1 if you have the <sys/stat.h> header file. */
162 #undef HAVE_SYS_STAT_H
164 /* Define to 1 if you have the <sys/types.h> header file. */
165 #undef HAVE_SYS_TYPES_H
167 /* Define to 1 if you have the `timegm' function. */
170 /* Define to 1 if you have the <time.h> header file. */
173 /* Define to 1 if you have the <unistd.h> header file. */
176 /* Define to 1 if you have the <winsock2.h> header file. */
177 #undef HAVE_WINSOCK2_H
179 /* Define to 1 if you have the <ws2tcpip.h> header file. */
180 #undef HAVE_WS2TCPIP_H
182 /* Define to the sub-directory in which libtool stores uninstalled libraries.
186 /* Define to the address where bug reports for this package should be sent. */
187 #undef PACKAGE_BUGREPORT
189 /* Define to the full name of this package. */
192 /* Define to the full name and version of this package. */
193 #undef PACKAGE_STRING
195 /* Define to the one symbol short name of this package. */
196 #undef PACKAGE_TARNAME
198 /* Define to the version of this package. */
199 #undef PACKAGE_VERSION
201 /* Define to 1 if you have the ANSI C header files. */
204 /* System configuration dir */
207 /* Define this to enable GOST support. */
210 /* Define this to enable SHA256 and SHA512 support. */
213 /* Enable extensions on AIX 3, Interix. */
217 /* Enable GNU extensions on systems that have them. */
221 /* Enable threading extensions on Solaris. */
222 #ifndef _POSIX_PTHREAD_SEMANTICS
223 # undef _POSIX_PTHREAD_SEMANTICS
225 /* Enable extensions on HP NonStop. */
226 #ifndef _TANDEM_SOURCE
227 # undef _TANDEM_SOURCE
229 /* Enable general extensions on Solaris. */
230 #ifndef __EXTENSIONS__
231 # undef __EXTENSIONS__
235 /* Whether the windows socket API is used */
238 /* the version of the windows API enabled */
241 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
242 significant byte first (like Motorola and SPARC, unlike Intel). */
243 #if defined AC_APPLE_UNIVERSAL_BUILD
244 # if defined __BIG_ENDIAN__
245 # define WORDS_BIGENDIAN 1
248 # ifndef WORDS_BIGENDIAN
249 # undef WORDS_BIGENDIAN
253 /* Define to 1 if on MINIX. */
256 /* Define to 2 if the system does not provide POSIX.1 features except with
258 #undef _POSIX_1_SOURCE
260 /* Define to 1 if you need to in order for `stat' and other things to work. */
263 /* Define to empty if `const' does not conform to ANSI C. */
272 /* Define to `__inline__' or `__inline' if that's what the C compiler
273 calls it, or to nothing if 'inline' is not supported under any name. */
278 /* Define to `short' if <sys/types.h> does not define. */
281 /* Define to `int' if <sys/types.h> does not define. */
284 /* Define to `long long' if <sys/types.h> does not define. */
287 /* Define to `char' if <sys/types.h> does not define. */
290 /* Define to rpl_malloc if the replacement function should be used. */
293 /* Define to rpl_realloc if the replacement function should be used. */
296 /* Define to 'int' if not defined */
299 /* Define to `int' if <sys/types.h> does not define. */
302 /* Define to `unsigned short' if <sys/types.h> does not define. */
305 /* Define to `unsigned int' if <sys/types.h> does not define. */
308 /* Define to `unsigned long long' if <sys/types.h> does not define. */
311 /* Define to `unsigned char' if <sys/types.h> does not define. */
320 #ifndef LITTLE_ENDIAN
321 #define LITTLE_ENDIAN 1234
325 #define BIG_ENDIAN 4321
329 #ifdef WORDS_BIGENDIAN
330 #define BYTE_ORDER BIG_ENDIAN
332 #define BYTE_ORDER LITTLE_ENDIAN
333 #endif /* WORDS_BIGENDIAN */
334 #endif /* BYTE_ORDER */
345 #ifdef HAVE_SYS_SOCKET_H
346 #include <sys/socket.h>
349 #ifdef HAVE_NETINET_IN_H
350 #include <netinet/in.h>
353 #ifdef HAVE_ARPA_INET_H
354 #include <arpa/inet.h>
357 #ifdef HAVE_WINSOCK2_H
358 #include <winsock2.h>
361 #ifdef HAVE_WS2TCPIP_H
362 #include <ws2tcpip.h>
366 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
367 #ifdef HAVE_WINSOCK2_H
368 #define FD_SET_T (u_int)
377 int ldns_b64_ntop(uint8_t const *src, size_t srclength,
378 char *target, size_t targsize);
380 * calculates the size needed to store the result of b64_ntop
383 static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
385 return ((((srcsize + 2) / 3) * 4) + 1);
387 #endif /* !B64_PTON */
389 int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
391 * calculates the size needed to store the result of ldns_b64_pton
394 static inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
396 return ((((srcsize / 4) * 3) - 2) + 2);
398 #endif /* !B64_NTOP */
401 /* use windows sleep, in millisecs, instead */
402 #define sleep(x) Sleep((x)*1000)
406 #define srandom(x) srand(x)
407 #define random(x) rand(x)
412 time_t timegm (struct tm *tm);
414 #ifndef HAVE_GMTIME_R
415 struct tm *gmtime_r(const time_t *timep, struct tm *result);
419 #endif /* !HAVE_ISBLANK */
420 #ifndef HAVE_SNPRINTF
422 int snprintf (char *str, size_t count, const char *fmt, ...);
423 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
424 #endif /* HAVE_SNPRINTF */
425 #ifndef HAVE_INET_PTON
426 int inet_pton(int af, const char* src, void* dst);
427 #endif /* HAVE_INET_PTON */
428 #ifndef HAVE_INET_NTOP
429 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
431 #ifndef HAVE_INET_ATON
432 int inet_aton(const char *cp, struct in_addr *addr);
435 void *memmove(void *dest, const void *src, size_t n);
438 size_t strlcpy(char *dst, const char *src, size_t siz);
440 #ifndef HAVE_GETADDRINFO
441 #include "compat/fake-rfc2553.h"