1234a736des/* ldns/config.h.  Generated from config.h.in by configure.  */
2234a736des/* ldns/config.h.in.  Generated from configure.ac by autoheader.  */
3234a736des
4234a736des/* Define if building universal (internal helper macro) */
5234a736des/* #undef AC_APPLE_UNIVERSAL_BUILD */
6234a736des
7234a736des/* Define to 1 if you have the <arpa/inet.h> header file. */
8234a736des#define HAVE_ARPA_INET_H 1
9234a736des
10234a736des/* Whether the C compiler accepts the "format" attribute */
11234a736des#define HAVE_ATTR_FORMAT 1
12234a736des
13234a736des/* Whether the C compiler accepts the "unused" attribute */
14234a736des#define HAVE_ATTR_UNUSED 1
15234a736des
16234a736des/* Define to 1 if you have the `b32_ntop' function. */
17234a736des/* #undef HAVE_B32_NTOP */
18234a736des
19234a736des/* Define to 1 if you have the `b32_pton' function. */
20234a736des/* #undef HAVE_B32_PTON */
21234a736des
22234a736des/* Define to 1 if you have the `b64_ntop' function. */
23234a736des/* #undef HAVE_B64_NTOP */
24234a736des
25234a736des/* Define to 1 if you have the `b64_pton' function. */
26234a736des/* #undef HAVE_B64_PTON */
27234a736des
28234a736des/* Define to 1 if you have the `bzero' function. */
29234a736des#define HAVE_BZERO 1
30234a736des
31234a736des/* Define to 1 if you have the `calloc' function. */
32234a736des#define HAVE_CALLOC 1
33234a736des
34234a736des/* Define to 1 if you have the `ctime_r' function. */
35234a736des#define HAVE_CTIME_R 1
36234a736des
37f748542des/* Is a CAFILE given at configure time */
38d2c3957des#define HAVE_DANE_CA_FILE 0
39f748542des
40f748542des/* Is a CAPATH given at configure time */
41d2c3957des#define HAVE_DANE_CA_PATH 0
42f748542des
43234a736des/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
44234a736des   don't. */
45234a736des#define HAVE_DECL_NID_SECP384R1 1
46234a736des
4793ec55edes/* Define to 1 if you have the declaration of `NID_X25519', and to 0 if you
4893ec55edes   don't. */
49d300320des/* #undef HAVE_DECL_NID_X25519 */
5093ec55edes
5193ec55edes/* Define to 1 if you have the declaration of `NID_X448', and to 0 if you
5293ec55edes   don't. */
53d300320des/* #undef HAVE_DECL_NID_X448 */
5493ec55edes
55234a736des/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
56234a736des   if you don't. */
57234a736des#define HAVE_DECL_NID_X9_62_PRIME256V1 1
58234a736des
59234a736des/* Define to 1 if you have the <dlfcn.h> header file. */
60234a736des#define HAVE_DLFCN_H 1
61234a736des
6293ec55edes/* Define to 1 if you have the `DSA_get0_key' function. */
639c688a4jkim#define HAVE_DSA_GET0_KEY 1
6493ec55edes
6593ec55edes/* Define to 1 if you have the `DSA_get0_pqg' function. */
669c688a4jkim#define HAVE_DSA_GET0_PQG 1
6793ec55edes
6893ec55edes/* Define to 1 if you have the `DSA_SIG_get0' function. */
699c688a4jkim#define HAVE_DSA_SIG_GET0 1
7093ec55edes
7193ec55edes/* Define to 1 if you have the `DSA_SIG_set0' function. */
729c688a4jkim#define HAVE_DSA_SIG_SET0 1
7393ec55edes
7493ec55edes/* Define to 1 if you have the `ECDSA_SIG_get0' function. */
759c688a4jkim#define HAVE_ECDSA_SIG_GET0 1
7693ec55edes
77234a736des/* Define to 1 if you have the `endprotoent' function. */
78234a736des#define HAVE_ENDPROTOENT 1
79234a736des
80234a736des/* Define to 1 if you have the `endservent' function. */
81234a736des#define HAVE_ENDSERVENT 1
82234a736des
8393ec55edes/* Define to 1 if you have the `ENGINE_load_cryptodev' function. */
84d300320des#define HAVE_ENGINE_LOAD_CRYPTODEV 1
8593ec55edes
8693ec55edes/* Define to 1 if you have the `EVP_dss1' function. */
879c688a4jkim/* #undef HAVE_EVP_DSS1 */
8893ec55edes
8993ec55edes/* Define to 1 if you have the `EVP_MD_CTX_new' function. */
909c688a4jkim#define HAVE_EVP_MD_CTX_NEW 1
9193ec55edes
9293ec55edes/* Define to 1 if you have the `EVP_PKEY_base_id' function. */
93d300320des#define HAVE_EVP_PKEY_BASE_ID 1
9493ec55edes
9593ec55edes/* Define to 1 if you have the `EVP_PKEY_keygen' function. */
96d300320des#define HAVE_EVP_PKEY_KEYGEN 1
9793ec55edes
98234a736des/* Define to 1 if you have the `EVP_sha256' function. */
99234a736des#define HAVE_EVP_SHA256 1
100234a736des
10193ec55edes/* Define to 1 if you have the `EVP_sha384' function. */
102d300320des#define HAVE_EVP_SHA384 1
10393ec55edes
10493ec55edes/* Define to 1 if you have the `EVP_sha512' function. */
105d300320des#define HAVE_EVP_SHA512 1
10693ec55edes
107234a736des/* Define to 1 if you have the `fcntl' function. */
108234a736des#define HAVE_FCNTL 1
109234a736des
110234a736des/* Define to 1 if you have the `fork' function. */
111234a736des#define HAVE_FORK 1
112234a736des
113234a736des/* Whether getaddrinfo is available */
114234a736des#define HAVE_GETADDRINFO 1
115234a736des
116234a736des/* Define to 1 if you have the <getopt.h> header file. */
117234a736des#define HAVE_GETOPT_H 1
118234a736des
119234a736des/* Define to 1 if you have the `gmtime_r' function. */
120234a736des#define HAVE_GMTIME_R 1
121234a736des
12293ec55edes/* If you have HMAC_Update */
123d300320des#define HAVE_HMAC_UPDATE 1
124234a736des
125234a736des/* Define to 1 if you have the `inet_aton' function. */
126234a736des#define HAVE_INET_ATON 1
127234a736des
128234a736des/* Define to 1 if you have the `inet_ntop' function. */
129234a736des#define HAVE_INET_NTOP 1
130234a736des
131234a736des/* Define to 1 if you have the `inet_pton' function. */
132234a736des#define HAVE_INET_PTON 1
133234a736des
134234a736des/* define if you have inttypes.h */
135234a736des#define HAVE_INTTYPES_H 1
136234a736des
137234a736des/* if the function 'ioctlsocket' is available */
138234a736des/* #undef HAVE_IOCTLSOCKET */
139234a736des
140234a736des/* Define to 1 if you have the `isascii' function. */
141234a736des#define HAVE_ISASCII 1
142234a736des
143234a736des/* Define to 1 if you have the `isblank' function. */
144234a736des#define HAVE_ISBLANK 1
145234a736des
146234a736des/* Define to 1 if you have the `pcap' library (-lpcap). */
147234a736des/* #undef HAVE_LIBPCAP */
148234a736des
14993ec55edes/* Define if we have LibreSSL */
150d300320des/* #undef HAVE_LIBRESSL */
15193ec55edes
152234a736des/* Define to 1 if you have the `localtime_r' function. */
153234a736des#define HAVE_LOCALTIME_R 1
154234a736des
155234a736des/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
156234a736des   to 0 otherwise. */
157234a736des#define HAVE_MALLOC 1
158234a736des
159234a736des/* Define to 1 if you have the `memmove' function. */
160234a736des#define HAVE_MEMMOVE 1
161234a736des
162234a736des/* Define to 1 if you have the <memory.h> header file. */
163234a736des#define HAVE_MEMORY_H 1
164234a736des
165234a736des/* Define to 1 if you have the `memset' function. */
166234a736des#define HAVE_MEMSET 1
167234a736des
168234a736des/* Define to 1 if you have the <netdb.h> header file. */
169234a736des#define HAVE_NETDB_H 1
170234a736des
171234a736des/* Define to 1 if you have the <netinet/if_ether.h> header file. */
172234a736des/* #undef HAVE_NETINET_IF_ETHER_H */
173234a736des
174234a736des/* Define to 1 if you have the <netinet/igmp.h> header file. */
175234a736des/* #undef HAVE_NETINET_IGMP_H */
176234a736des
177234a736des/* Define to 1 if you have the <netinet/in.h> header file. */
178234a736des#define HAVE_NETINET_IN_H 1
179234a736des
180234a736des/* Define to 1 if you have the <netinet/in_systm.h> header file. */
181234a736des/* #undef HAVE_NETINET_IN_SYSTM_H */
182234a736des
183234a736des/* Define to 1 if you have the <netinet/ip6.h> header file. */
184234a736des/* #undef HAVE_NETINET_IP6_H */
185234a736des
186234a736des/* Define to 1 if you have the <netinet/ip_compat.h> header file. */
187234a736des/* #undef HAVE_NETINET_IP_COMPAT_H */
188234a736des
189234a736des/* Define to 1 if you have the <netinet/ip.h> header file. */
190234a736des/* #undef HAVE_NETINET_IP_H */
191234a736des
192234a736des/* Define to 1 if you have the <netinet/udp.h> header file. */
193234a736des/* #undef HAVE_NETINET_UDP_H */
194234a736des
195234a736des/* Define to 1 if you have the <net/ethernet.h> header file. */
196234a736des/* #undef HAVE_NET_ETHERNET_H */
197234a736des
198234a736des/* Define to 1 if you have the <net/if.h> header file. */
199234a736des/* #undef HAVE_NET_IF_H */
200234a736des
201234a736des/* Define to 1 if you have the <openssl/err.h> header file. */
202234a736des#define HAVE_OPENSSL_ERR_H 1
203234a736des
204234a736des/* Define to 1 if you have the <openssl/rand.h> header file. */
205234a736des#define HAVE_OPENSSL_RAND_H 1
206234a736des
207234a736des/* Define to 1 if you have the <openssl/ssl.h> header file. */
208234a736des#define HAVE_OPENSSL_SSL_H 1
209234a736des
210234a736des/* Define to 1 if you have the <pcap.h> header file. */
211234a736des/* #undef HAVE_PCAP_H */
212234a736des
21393ec55edes/* This platform supports poll(7). */
214d300320des#define HAVE_POLL 1
21593ec55edes
216234a736des/* If available, contains the Python version number currently in use. */
217234a736des/* #undef HAVE_PYTHON */
218234a736des
219234a736des/* Define to 1 if you have the `random' function. */
220234a736des#define HAVE_RANDOM 1
221234a736des
222234a736des/* Define to 1 if your system has a GNU libc compatible `realloc' function,
223234a736des   and to 0 otherwise. */
224234a736des#define HAVE_REALLOC 1
225234a736des
226234a736des/* Define to 1 if you have the `sleep' function. */
227234a736des#define HAVE_SLEEP 1
228234a736des
229234a736des/* Define to 1 if you have the `snprintf' function. */
230234a736des#define HAVE_SNPRINTF 1
231234a736des
232234a736des/* Define if you have the SSL libraries installed. */
233234a736des#define HAVE_SSL /**/
234234a736des
235234a736des/* Define to 1 if you have the <stdarg.h> header file. */
236234a736des#define HAVE_STDARG_H 1
237234a736des
238234a736des/* Define to 1 if stdbool.h conforms to C99. */
239234a736des#define HAVE_STDBOOL_H 1
240234a736des
241234a736des/* Define to 1 if you have the <stdint.h> header file. */
242234a736des#define HAVE_STDINT_H 1
243234a736des
244234a736des/* Define to 1 if you have the <stdlib.h> header file. */
245234a736des#define HAVE_STDLIB_H 1
246234a736des
247234a736des/* Define to 1 if you have the <strings.h> header file. */
248234a736des#define HAVE_STRINGS_H 1
249234a736des
250234a736des/* Define to 1 if you have the <string.h> header file. */
251234a736des#define HAVE_STRING_H 1
252234a736des
253234a736des/* Define to 1 if you have the `strlcpy' function. */
254234a736des#define HAVE_STRLCPY 1
255234a736des
256234a736des/* Define to 1 if you have the `strtoul' function. */
257234a736des#define HAVE_STRTOUL 1
258234a736des
259234a736des/* Define if you have SWIG libraries and header files. */
260234a736des/* #undef HAVE_SWIG */
261234a736des
262234a736des/* Define to 1 if you have the <sys/mount.h> header file. */
263234a736des#define HAVE_SYS_MOUNT_H 1
264234a736des
265234a736des/* Define to 1 if you have the <sys/param.h> header file. */
266234a736des#define HAVE_SYS_PARAM_H 1
267234a736des
268234a736des/* define if you have sys/socket.h */
269234a736des#define HAVE_SYS_SOCKET_H 1
270234a736des
271234a736des/* Define to 1 if you have the <sys/stat.h> header file. */
272234a736des#define HAVE_SYS_STAT_H 1
273234a736des
274234a736des/* define if you have sys/types.h */
275234a736des#define HAVE_SYS_TYPES_H 1
276234a736des
277234a736des/* Define to 1 if you have the `timegm' function. */
278234a736des#define HAVE_TIMEGM 1
279234a736des
280234a736des/* Define to 1 if you have the <time.h> header file. */
281234a736des#define HAVE_TIME_H 1
282234a736des
283234a736des/* define if you have unistd.h */
284234a736des#define HAVE_UNISTD_H 1
285234a736des
286234a736des/* Define to 1 if you have the `vfork' function. */
287234a736des#define HAVE_VFORK 1
288234a736des
289234a736des/* Define to 1 if you have the <vfork.h> header file. */
290234a736des/* #undef HAVE_VFORK_H */
291234a736des
292234a736des/* Define to 1 if you have the <winsock2.h> header file. */
293234a736des/* #undef HAVE_WINSOCK2_H */
294234a736des
295234a736des/* Define to 1 if `fork' works. */
296234a736des#define HAVE_WORKING_FORK 1
297234a736des
298234a736des/* Define to 1 if `vfork' works. */
299234a736des#define HAVE_WORKING_VFORK 1
300234a736des
301234a736des/* Define to 1 if you have the <ws2tcpip.h> header file. */
302234a736des/* #undef HAVE_WS2TCPIP_H */
303234a736des
304234a736des/* Define to 1 if the system has the type `_Bool'. */
305234a736des#define HAVE__BOOL 1
306234a736des
307f748542des/* Is a CAFILE given at configure time */
308d2c3957des/* #undef LDNS_DANE_CA_FILE */
309f748542des
310f748542des/* Is a CAPATH given at configure time */
311d2c3957des/* #undef LDNS_DANE_CA_PATH */
312f748542des
31393ec55edes/* Define to the sub-directory where libtool stores uninstalled libraries. */
314234a736des#define LT_OBJDIR ".libs/"
315234a736des
316234a736des/* Define to the address where bug reports for this package should be sent. */
317234a736des#define PACKAGE_BUGREPORT "libdns@nlnetlabs.nl"
318234a736des
319234a736des/* Define to the full name of this package. */
320234a736des#define PACKAGE_NAME "ldns"
321234a736des
322234a736des/* Define to the full name and version of this package. */
323d300320des#define PACKAGE_STRING "ldns 1.7.0"
324234a736des
325234a736des/* Define to the one symbol short name of this package. */
326234a736des#define PACKAGE_TARNAME "libdns"
327234a736des
328234a736des/* Define to the home page for this package. */
329234a736des#define PACKAGE_URL ""
330234a736des
331234a736des/* Define to the version of this package. */
332d300320des#define PACKAGE_VERSION "1.7.0"
333481a5ccdes
33493ec55edes/* Define this to enable RR type AVC. */
335d300320des/* #undef RRTYPE_AVC */
336ea0dad8des
337ea0dad8des/* Define this to enable RR type NINFO. */
338f3c2b78des/* #undef RRTYPE_NINFO */
339ea0dad8des
34093ec55edes/* Define this to enable RR type OPENPGPKEY. */
341d300320des#define RRTYPE_OPENPGPKEY /**/
34293ec55edes
343ea0dad8des/* Define this to enable RR type RKEY. */
344f3c2b78des/* #undef RRTYPE_RKEY */
345ea0dad8des
346ea0dad8des/* Define this to enable RR type TA. */
347f3c2b78des/* #undef RRTYPE_TA */
348ea0dad8des
349234a736des/* The size of `time_t', as computed by sizeof. */
350234a736des#define SIZEOF_TIME_T 8
351234a736des
352234a736des/* Define to 1 if you have the ANSI C header files. */
353234a736des#define STDC_HEADERS 1
354234a736des
355ea0dad8des/* Define this to enable messages to stderr. */
356f3c2b78des/* #undef STDERR_MSGS */
357ea0dad8des
358234a736des/* System configuration dir */
359234a736des#define SYSCONFDIR sysconfdir
360234a736des
361ea0dad8des/* Define this to enable DANE support. */
362f3c2b78des#define USE_DANE 1
363ea0dad8des
36493ec55edes/* Define this to enable DANE-TA usage type support. */
365612599ades#define USE_DANE_TA_USAGE 1
36693ec55edes
36793ec55edes/* Define this to enable DANE verify support. */
368d300320des#define USE_DANE_VERIFY 1
36993ec55edes
37093ec55edes/* Define this to enable DSA support. */
371d300320des#define USE_DSA 1
37293ec55edes
373234a736des/* Define this to enable ECDSA support. */
374234a736des#define USE_ECDSA 1
375234a736des
37693ec55edes/* Define this to enable ED25519 support. */
377d300320des/* #undef USE_ED25519 */
37893ec55edes
37993ec55edes/* Define this to enable ED448 support. */
380d300320des/* #undef USE_ED448 */
38193ec55edes
382234a736des/* Define this to enable GOST support. */
383612599ades/* #undef USE_GOST */
384234a736des
385234a736des/* Define this to enable SHA256 and SHA512 support. */
386234a736des#define USE_SHA2 1
387234a736des
388234a736des/* Enable extensions on AIX 3, Interix.  */
389234a736des#ifndef _ALL_SOURCE
390234a736des# define _ALL_SOURCE 1
391234a736des#endif
392234a736des/* Enable GNU extensions on systems that have them.  */
393234a736des#ifndef _GNU_SOURCE
394234a736des# define _GNU_SOURCE 1
395234a736des#endif
396234a736des/* Enable threading extensions on Solaris.  */
397234a736des#ifndef _POSIX_PTHREAD_SEMANTICS
398234a736des# define _POSIX_PTHREAD_SEMANTICS 1
399234a736des#endif
400234a736des/* Enable extensions on HP NonStop.  */
401234a736des#ifndef _TANDEM_SOURCE
402234a736des# define _TANDEM_SOURCE 1
403234a736des#endif
404234a736des/* Enable general extensions on Solaris.  */
405234a736des#ifndef __EXTENSIONS__
406234a736des# define __EXTENSIONS__ 1
407234a736des#endif
408234a736des
409234a736des
410234a736des/* Whether the windows socket API is used */
411234a736des/* #undef USE_WINSOCK */
412234a736des
413234a736des/* the version of the windows API enabled */
414234a736des#define WINVER 0x0502
415234a736des
416234a736des/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
417234a736des   significant byte first (like Motorola and SPARC, unlike Intel). */
418234a736des#if defined AC_APPLE_UNIVERSAL_BUILD
419234a736des# if defined __BIG_ENDIAN__
420234a736des#  define WORDS_BIGENDIAN 1
421234a736des# endif
422234a736des#else
423234a736des# ifndef WORDS_BIGENDIAN
424234a736des/* #  undef WORDS_BIGENDIAN */
425234a736des# endif
426234a736des#endif
427234a736des
428234a736des/* Define to 1 if on MINIX. */
429234a736des/* #undef _MINIX */
430234a736des
43193ec55edes/* Enable for compile on Minix */
432d300320des/* #undef _NETBSD_SOURCE */
43393ec55edes
434234a736des/* Define to 2 if the system does not provide POSIX.1 features except with
435234a736des   this defined. */
436234a736des/* #undef _POSIX_1_SOURCE */
437234a736des
438234a736des/* Define to 1 if you need to in order for `stat' and other things to work. */
439234a736des/* #undef _POSIX_SOURCE */
440234a736des
441234a736des/* Define to empty if `const' does not conform to ANSI C. */
442234a736des/* #undef const */
443234a736des
444234a736des/* in_addr_t */
445234a736des/* #undef in_addr_t */
446234a736des
447234a736des/* in_port_t */
448234a736des/* #undef in_port_t */
449234a736des
450234a736des/* Define to `__inline__' or `__inline' if that's what the C compiler
451234a736des   calls it, or to nothing if 'inline' is not supported under any name.  */
452234a736des#ifndef __cplusplus
453234a736des/* #undef inline */
454234a736des#endif
455234a736des
456234a736des/* Define to `short' if <sys/types.h> does not define. */
457234a736des/* #undef int16_t */
458234a736des
459234a736des/* Define to `int' if <sys/types.h> does not define. */
460234a736des/* #undef int32_t */
461234a736des
462234a736des/* Define to `long long' if <sys/types.h> does not define. */
463234a736des/* #undef int64_t */
464234a736des
465234a736des/* Define to `char' if <sys/types.h> does not define. */
466234a736des/* #undef int8_t */
467234a736des
468ea0dad8des/* Define to `size_t' if <sys/types.h> does not define. */
469234a736des/* #undef intptr_t */
470234a736des
471234a736des/* Define to rpl_malloc if the replacement function should be used. */
472234a736des/* #undef malloc */
473234a736des
474234a736des/* Define to `int' if <sys/types.h> does not define. */
475234a736des/* #undef pid_t */
476234a736des
477234a736des/* Define to rpl_realloc if the replacement function should be used. */
478234a736des/* #undef realloc */
479234a736des
480234a736des/* Define to `unsigned int' if <sys/types.h> does not define. */
481234a736des/* #undef size_t */
482234a736des
483234a736des/* Define to 'int' if not defined */
484234a736des/* #undef socklen_t */
485234a736des
486234a736des/* Fallback member name for socket family in struct sockaddr_storage */
487234a736des/* #undef ss_family */
488234a736des
489234a736des/* Define to `int' if <sys/types.h> does not define. */
490234a736des/* #undef ssize_t */
491234a736des
492234a736des/* Define to `unsigned short' if <sys/types.h> does not define. */
493234a736des/* #undef uint16_t */
494234a736des
495234a736des/* Define to `unsigned int' if <sys/types.h> does not define. */
496234a736des/* #undef uint32_t */
497234a736des
498234a736des/* Define to `unsigned long long' if <sys/types.h> does not define. */
499234a736des/* #undef uint64_t */
500234a736des
501234a736des/* Define to `unsigned char' if <sys/types.h> does not define. */
502234a736des/* #undef uint8_t */
503234a736des
504234a736des/* Define as `fork' if `vfork' does not work. */
505234a736des/* #undef vfork */
506234a736des
507234a736des
508234a736des#include <stdio.h>
509234a736des#include <string.h>
510234a736des#include <unistd.h>
511234a736des#include <assert.h>
512234a736des
513234a736des#ifndef LITTLE_ENDIAN
514234a736des#define LITTLE_ENDIAN 1234
515234a736des#endif
516234a736des
517234a736des#ifndef BIG_ENDIAN
518234a736des#define BIG_ENDIAN 4321
519234a736des#endif
520234a736des
521234a736des#ifndef BYTE_ORDER
522234a736des#ifdef WORDS_BIGENDIAN
523234a736des#define BYTE_ORDER BIG_ENDIAN
524234a736des#else
525234a736des#define BYTE_ORDER LITTLE_ENDIAN
526234a736des#endif /* WORDS_BIGENDIAN */
527234a736des#endif /* BYTE_ORDER */
528234a736des
529234a736des#if STDC_HEADERS
530234a736des#include <stdlib.h>
531234a736des#include <stddef.h>
532234a736des#endif
533234a736des
534234a736des#ifdef HAVE_STDINT_H
535234a736des#include <stdint.h>
536234a736des#endif
537234a736des
538234a736des#ifdef HAVE_SYS_SOCKET_H
539234a736des#include <sys/socket.h>
540234a736des#endif
541234a736des
542234a736des#ifdef HAVE_NETINET_IN_H
543234a736des#include <netinet/in.h>
544234a736des#endif
545234a736des
546234a736des#ifdef HAVE_ARPA_INET_H
547234a736des#include <arpa/inet.h>
548234a736des#endif
549234a736des
550234a736des#ifdef HAVE_WINSOCK2_H
551234a736des#include <winsock2.h>
552234a736des#endif
553234a736des
554234a736des#ifdef HAVE_WS2TCPIP_H
555234a736des#include <ws2tcpip.h>
556234a736des#endif
557234a736des
558234a736des
559234a736des/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
560234a736des#ifdef HAVE_WINSOCK2_H
561234a736des#define FD_SET_T (u_int)
562234a736des#else
563234a736des#define FD_SET_T
564234a736des#endif
565234a736des
566234a736des
567234a736des
568234a736des
569234a736des#ifdef __cplusplus
570234a736desextern "C" {
571234a736des#endif
572234a736des
573481a5ccdesint ldns_b64_ntop(uint8_t const *src, size_t srclength,
574481a5ccdes	 	  char *target, size_t targsize);
575481a5ccdes/**
576481a5ccdes * calculates the size needed to store the result of b64_ntop
577481a5ccdes */
578481a5ccdes/*@unused@*/
579481a5ccdesstatic inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
580481a5ccdes{
581481a5ccdes	return ((((srcsize + 2) / 3) * 4) + 1);
582481a5ccdes}
583481a5ccdesint ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
584481a5ccdes/**
585481a5ccdes * calculates the size needed to store the result of ldns_b64_pton
586481a5ccdes */
587481a5ccdes/*@unused@*/
588481a5ccdesstatic inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
589481a5ccdes{
590481a5ccdes	return (((((srcsize + 3) / 4) * 3)) + 1);
591481a5ccdes}
592ea0dad8des
593ea0dad8des/**
594ea0dad8des * Given in dnssec_zone.c, also used in dnssec_sign.c:w
595ea0dad8des
596ea0dad8des */
597ea0dad8desint ldns_dname_compare_v(const void *a, const void *b);
598481a5ccdes
599234a736des#ifndef HAVE_SLEEP
600234a736des/* use windows sleep, in millisecs, instead */
601234a736des#define sleep(x) Sleep((x)*1000)
602234a736des#endif
603234a736des
604234a736des#ifndef HAVE_RANDOM
605234a736des#define srandom(x) srand(x)
606234a736des#define random(x) rand(x)
607234a736des#endif
608234a736des
609234a736des#ifndef HAVE_TIMEGM
610234a736des#include <time.h>
611234a736destime_t timegm (struct tm *tm);
612234a736des#endif /* !TIMEGM */
613234a736des#ifndef HAVE_GMTIME_R
614234a736desstruct tm *gmtime_r(const time_t *timep, struct tm *result);
615234a736des#endif
616234a736des#ifndef HAVE_LOCALTIME_R
617234a736desstruct tm *localtime_r(const time_t *timep, struct tm *result);
618234a736des#endif
619234a736des#ifndef HAVE_ISBLANK
620234a736desint isblank(int c);
621234a736des#endif /* !HAVE_ISBLANK */
622234a736des#ifndef HAVE_ISASCII
623234a736desint isascii(int c);
624234a736des#endif /* !HAVE_ISASCII */
625234a736des#ifndef HAVE_SNPRINTF
626234a736des#include <stdarg.h>
627234a736desint snprintf (char *str, size_t count, const char *fmt, ...);
628234a736desint vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
629234a736des#endif /* HAVE_SNPRINTF */
630234a736des#ifndef HAVE_INET_PTON
631234a736desint inet_pton(int af, const char* src, void* dst);
632234a736des#endif /* HAVE_INET_PTON */
633234a736des#ifndef HAVE_INET_NTOP
634234a736desconst char *inet_ntop(int af, const void *src, char *dst, size_t size);
635234a736des#endif
636234a736des#ifndef HAVE_INET_ATON
637234a736desint inet_aton(const char *cp, struct in_addr *addr);
638234a736des#endif
639234a736des#ifndef HAVE_MEMMOVE
640234a736desvoid *memmove(void *dest, const void *src, size_t n);
641234a736des#endif
642234a736des#ifndef HAVE_STRLCPY
643234a736dessize_t strlcpy(char *dst, const char *src, size_t siz);
644234a736des#endif
64593ec55edes
64693ec55edes#ifdef USE_WINSOCK
64793ec55edes#define SOCK_INVALID INVALID_SOCKET
64893ec55edes#define close_socket(_s) do { if (_s > SOCK_INVALID) {closesocket(_s); _s = SOCK_INVALID;} } while(0)
64993ec55edes#else
65093ec55edes#define SOCK_INVALID -1
65193ec55edes#define close_socket(_s) do { if (_s > SOCK_INVALID) {close(_s); _s = SOCK_INVALID;} } while(0)
65293ec55edes#endif
65393ec55edes
654234a736des#ifdef __cplusplus
655234a736des}
656234a736des#endif
657234a736des#ifndef HAVE_GETADDRINFO
658234a736des#include "compat/fake-rfc2553.h"
659234a736des#endif
660234a736des#ifndef HAVE_STRTOUL
661234a736des#define strtoul (unsigned long)strtol
662234a736des#endif
663234a736des
664