1246853Sdes/* ldns/config.h.  Generated from config.h.in by configure.  */
2246853Sdes/* ldns/config.h.in.  Generated from configure.ac by autoheader.  */
3246853Sdes
4246853Sdes/* Define if building universal (internal helper macro) */
5246853Sdes/* #undef AC_APPLE_UNIVERSAL_BUILD */
6246853Sdes
7246853Sdes/* Define to 1 if you have the <arpa/inet.h> header file. */
8246853Sdes#define HAVE_ARPA_INET_H 1
9246853Sdes
10246853Sdes/* Whether the C compiler accepts the "format" attribute */
11246853Sdes#define HAVE_ATTR_FORMAT 1
12246853Sdes
13246853Sdes/* Whether the C compiler accepts the "unused" attribute */
14246853Sdes#define HAVE_ATTR_UNUSED 1
15246853Sdes
16246853Sdes/* Define to 1 if you have the `b32_ntop' function. */
17246853Sdes/* #undef HAVE_B32_NTOP */
18246853Sdes
19246853Sdes/* Define to 1 if you have the `b32_pton' function. */
20246853Sdes/* #undef HAVE_B32_PTON */
21246853Sdes
22246853Sdes/* Define to 1 if you have the `b64_ntop' function. */
23246853Sdes/* #undef HAVE_B64_NTOP */
24246853Sdes
25246853Sdes/* Define to 1 if you have the `b64_pton' function. */
26246853Sdes/* #undef HAVE_B64_PTON */
27246853Sdes
28246853Sdes/* Define to 1 if you have the `bzero' function. */
29246853Sdes#define HAVE_BZERO 1
30246853Sdes
31246853Sdes/* Define to 1 if you have the `calloc' function. */
32246853Sdes#define HAVE_CALLOC 1
33246853Sdes
34246853Sdes/* Define to 1 if you have the `ctime_r' function. */
35246853Sdes#define HAVE_CTIME_R 1
36246853Sdes
37246854Sdes/* Is a CAFILE given at configure time */
38246854Sdes#define HAVE_DANE_CA_FILE 0
39246854Sdes
40246854Sdes/* Is a CAPATH given at configure time */
41246854Sdes#define HAVE_DANE_CA_PATH 0
42246854Sdes
43246853Sdes/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
44246853Sdes   don't. */
45246853Sdes#define HAVE_DECL_NID_SECP384R1 1
46246853Sdes
47246853Sdes/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
48246853Sdes   if you don't. */
49246853Sdes#define HAVE_DECL_NID_X9_62_PRIME256V1 1
50246853Sdes
51246853Sdes/* Define to 1 if you have the <dlfcn.h> header file. */
52246853Sdes#define HAVE_DLFCN_H 1
53246853Sdes
54246853Sdes/* Define to 1 if you have the `endprotoent' function. */
55246853Sdes#define HAVE_ENDPROTOENT 1
56246853Sdes
57246853Sdes/* Define to 1 if you have the `endservent' function. */
58246853Sdes#define HAVE_ENDSERVENT 1
59246853Sdes
60246853Sdes/* Define to 1 if you have the `EVP_sha256' function. */
61246853Sdes#define HAVE_EVP_SHA256 1
62246853Sdes
63246853Sdes/* Define to 1 if you have the `fcntl' function. */
64246853Sdes#define HAVE_FCNTL 1
65246853Sdes
66246853Sdes/* Define to 1 if you have the `fork' function. */
67246853Sdes#define HAVE_FORK 1
68246853Sdes
69246853Sdes/* Whether getaddrinfo is available */
70246853Sdes#define HAVE_GETADDRINFO 1
71246853Sdes
72246853Sdes/* Define to 1 if you have the <getopt.h> header file. */
73246853Sdes#define HAVE_GETOPT_H 1
74246853Sdes
75246853Sdes/* Define to 1 if you have the `gmtime_r' function. */
76246853Sdes#define HAVE_GMTIME_R 1
77246853Sdes
78246853Sdes/* If you have HMAC_CTX_init */
79246853Sdes#define HAVE_HMAC_CTX_INIT 1
80246853Sdes
81246853Sdes/* Define to 1 if you have the `inet_aton' function. */
82246853Sdes#define HAVE_INET_ATON 1
83246853Sdes
84246853Sdes/* Define to 1 if you have the `inet_ntop' function. */
85246853Sdes#define HAVE_INET_NTOP 1
86246853Sdes
87246853Sdes/* Define to 1 if you have the `inet_pton' function. */
88246853Sdes#define HAVE_INET_PTON 1
89246853Sdes
90246853Sdes/* define if you have inttypes.h */
91246853Sdes#define HAVE_INTTYPES_H 1
92246853Sdes
93246853Sdes/* if the function 'ioctlsocket' is available */
94246853Sdes/* #undef HAVE_IOCTLSOCKET */
95246853Sdes
96246853Sdes/* Define to 1 if you have the `isascii' function. */
97246853Sdes#define HAVE_ISASCII 1
98246853Sdes
99246853Sdes/* Define to 1 if you have the `isblank' function. */
100246853Sdes#define HAVE_ISBLANK 1
101246853Sdes
102246853Sdes/* Define to 1 if you have the `pcap' library (-lpcap). */
103246853Sdes/* #undef HAVE_LIBPCAP */
104246853Sdes
105246853Sdes/* Define to 1 if you have the `localtime_r' function. */
106246853Sdes#define HAVE_LOCALTIME_R 1
107246853Sdes
108246853Sdes/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
109246853Sdes   to 0 otherwise. */
110246853Sdes#define HAVE_MALLOC 1
111246853Sdes
112246853Sdes/* Define to 1 if you have the `memmove' function. */
113246853Sdes#define HAVE_MEMMOVE 1
114246853Sdes
115246853Sdes/* Define to 1 if you have the <memory.h> header file. */
116246853Sdes#define HAVE_MEMORY_H 1
117246853Sdes
118246853Sdes/* Define to 1 if you have the `memset' function. */
119246853Sdes#define HAVE_MEMSET 1
120246853Sdes
121246853Sdes/* Define to 1 if you have the <netdb.h> header file. */
122246853Sdes#define HAVE_NETDB_H 1
123246853Sdes
124246853Sdes/* Define to 1 if you have the <netinet/if_ether.h> header file. */
125246853Sdes/* #undef HAVE_NETINET_IF_ETHER_H */
126246853Sdes
127246853Sdes/* Define to 1 if you have the <netinet/igmp.h> header file. */
128246853Sdes/* #undef HAVE_NETINET_IGMP_H */
129246853Sdes
130246853Sdes/* Define to 1 if you have the <netinet/in.h> header file. */
131246853Sdes#define HAVE_NETINET_IN_H 1
132246853Sdes
133246853Sdes/* Define to 1 if you have the <netinet/in_systm.h> header file. */
134246853Sdes/* #undef HAVE_NETINET_IN_SYSTM_H */
135246853Sdes
136246853Sdes/* Define to 1 if you have the <netinet/ip6.h> header file. */
137246853Sdes/* #undef HAVE_NETINET_IP6_H */
138246853Sdes
139246853Sdes/* Define to 1 if you have the <netinet/ip_compat.h> header file. */
140246853Sdes/* #undef HAVE_NETINET_IP_COMPAT_H */
141246853Sdes
142246853Sdes/* Define to 1 if you have the <netinet/ip.h> header file. */
143246853Sdes/* #undef HAVE_NETINET_IP_H */
144246853Sdes
145246853Sdes/* Define to 1 if you have the <netinet/udp.h> header file. */
146246853Sdes/* #undef HAVE_NETINET_UDP_H */
147246853Sdes
148246853Sdes/* Define to 1 if you have the <net/ethernet.h> header file. */
149246853Sdes/* #undef HAVE_NET_ETHERNET_H */
150246853Sdes
151246853Sdes/* Define to 1 if you have the <net/if.h> header file. */
152246853Sdes/* #undef HAVE_NET_IF_H */
153246853Sdes
154246853Sdes/* Define to 1 if you have the <openssl/err.h> header file. */
155246853Sdes#define HAVE_OPENSSL_ERR_H 1
156246853Sdes
157246853Sdes/* Define to 1 if you have the <openssl/rand.h> header file. */
158246853Sdes#define HAVE_OPENSSL_RAND_H 1
159246853Sdes
160246853Sdes/* Define to 1 if you have the <openssl/ssl.h> header file. */
161246853Sdes#define HAVE_OPENSSL_SSL_H 1
162246853Sdes
163246853Sdes/* Define to 1 if you have the <pcap.h> header file. */
164246853Sdes/* #undef HAVE_PCAP_H */
165246853Sdes
166246853Sdes/* If available, contains the Python version number currently in use. */
167246853Sdes/* #undef HAVE_PYTHON */
168246853Sdes
169246853Sdes/* Define to 1 if you have the `random' function. */
170246853Sdes#define HAVE_RANDOM 1
171246853Sdes
172246853Sdes/* Define to 1 if your system has a GNU libc compatible `realloc' function,
173246853Sdes   and to 0 otherwise. */
174246853Sdes#define HAVE_REALLOC 1
175246853Sdes
176246853Sdes/* Define to 1 if you have the `sleep' function. */
177246853Sdes#define HAVE_SLEEP 1
178246853Sdes
179246853Sdes/* Define to 1 if you have the `snprintf' function. */
180246853Sdes#define HAVE_SNPRINTF 1
181246853Sdes
182246853Sdes/* Define if you have the SSL libraries installed. */
183246853Sdes#define HAVE_SSL /**/
184246853Sdes
185246853Sdes/* Define to 1 if you have the <stdarg.h> header file. */
186246853Sdes#define HAVE_STDARG_H 1
187246853Sdes
188246853Sdes/* Define to 1 if stdbool.h conforms to C99. */
189246853Sdes#define HAVE_STDBOOL_H 1
190246853Sdes
191246853Sdes/* Define to 1 if you have the <stdint.h> header file. */
192246853Sdes#define HAVE_STDINT_H 1
193246853Sdes
194246853Sdes/* Define to 1 if you have the <stdlib.h> header file. */
195246853Sdes#define HAVE_STDLIB_H 1
196246853Sdes
197246853Sdes/* Define to 1 if you have the <strings.h> header file. */
198246853Sdes#define HAVE_STRINGS_H 1
199246853Sdes
200246853Sdes/* Define to 1 if you have the <string.h> header file. */
201246853Sdes#define HAVE_STRING_H 1
202246853Sdes
203246853Sdes/* Define to 1 if you have the `strlcpy' function. */
204246853Sdes#define HAVE_STRLCPY 1
205246853Sdes
206246853Sdes/* Define to 1 if you have the `strtoul' function. */
207246853Sdes#define HAVE_STRTOUL 1
208246853Sdes
209246853Sdes/* Define if you have SWIG libraries and header files. */
210246853Sdes/* #undef HAVE_SWIG */
211246853Sdes
212246853Sdes/* Define to 1 if you have the <sys/mount.h> header file. */
213246853Sdes#define HAVE_SYS_MOUNT_H 1
214246853Sdes
215246853Sdes/* Define to 1 if you have the <sys/param.h> header file. */
216246853Sdes#define HAVE_SYS_PARAM_H 1
217246853Sdes
218246853Sdes/* define if you have sys/socket.h */
219246853Sdes#define HAVE_SYS_SOCKET_H 1
220246853Sdes
221246853Sdes/* Define to 1 if you have the <sys/stat.h> header file. */
222246853Sdes#define HAVE_SYS_STAT_H 1
223246853Sdes
224246853Sdes/* define if you have sys/types.h */
225246853Sdes#define HAVE_SYS_TYPES_H 1
226246853Sdes
227246853Sdes/* Define to 1 if you have the `timegm' function. */
228246853Sdes#define HAVE_TIMEGM 1
229246853Sdes
230246853Sdes/* Define to 1 if you have the <time.h> header file. */
231246853Sdes#define HAVE_TIME_H 1
232246853Sdes
233246853Sdes/* define if you have unistd.h */
234246853Sdes#define HAVE_UNISTD_H 1
235246853Sdes
236246853Sdes/* Define to 1 if you have the `vfork' function. */
237246853Sdes#define HAVE_VFORK 1
238246853Sdes
239246853Sdes/* Define to 1 if you have the <vfork.h> header file. */
240246853Sdes/* #undef HAVE_VFORK_H */
241246853Sdes
242246853Sdes/* Define to 1 if you have the <winsock2.h> header file. */
243246853Sdes/* #undef HAVE_WINSOCK2_H */
244246853Sdes
245246853Sdes/* Define to 1 if `fork' works. */
246246853Sdes#define HAVE_WORKING_FORK 1
247246853Sdes
248246853Sdes/* Define to 1 if `vfork' works. */
249246853Sdes#define HAVE_WORKING_VFORK 1
250246853Sdes
251246853Sdes/* Define to 1 if you have the <ws2tcpip.h> header file. */
252246853Sdes/* #undef HAVE_WS2TCPIP_H */
253246853Sdes
254246853Sdes/* Define to 1 if the system has the type `_Bool'. */
255246853Sdes#define HAVE__BOOL 1
256246853Sdes
257246854Sdes/* Is a CAFILE given at configure time */
258246854Sdes/* #undef LDNS_DANE_CA_FILE */
259246854Sdes
260246854Sdes/* Is a CAPATH given at configure time */
261246854Sdes/* #undef LDNS_DANE_CA_PATH */
262246854Sdes
263246854Sdes/* Default trust anchor file */
264246854Sdes#define LDNS_TRUST_ANCHOR_FILE "/etc/unbound/root.key"
265246854Sdes
266246853Sdes/* Define to the sub-directory in which libtool stores uninstalled libraries.
267246853Sdes   */
268246853Sdes#define LT_OBJDIR ".libs/"
269246853Sdes
270246853Sdes/* Define to the address where bug reports for this package should be sent. */
271246853Sdes#define PACKAGE_BUGREPORT "libdns@nlnetlabs.nl"
272246853Sdes
273246853Sdes/* Define to the full name of this package. */
274246853Sdes#define PACKAGE_NAME "ldns"
275246853Sdes
276246853Sdes/* Define to the full name and version of this package. */
277266114Sdes#define PACKAGE_STRING "ldns 1.6.17"
278246853Sdes
279246853Sdes/* Define to the one symbol short name of this package. */
280246853Sdes#define PACKAGE_TARNAME "libdns"
281246853Sdes
282246853Sdes/* Define to the home page for this package. */
283246853Sdes#define PACKAGE_URL ""
284246853Sdes
285246853Sdes/* Define to the version of this package. */
286266114Sdes#define PACKAGE_VERSION "1.6.17"
287246853Sdes
288266114Sdes/* Define this to enable RR type CDS. */
289266114Sdes/* #undef RRTYPE_CDS */
290266114Sdes
291266114Sdes/* Define this to enable RR type NINFO. */
292266114Sdes/* #undef RRTYPE_NINFO */
293266114Sdes
294266114Sdes/* Define this to enable RR type RKEY. */
295266114Sdes/* #undef RRTYPE_RKEY */
296266114Sdes
297266114Sdes/* Define this to enable RR type TA. */
298266114Sdes/* #undef RRTYPE_TA */
299266114Sdes
300266114Sdes/* Define this to enable RR type URI. */
301266114Sdes/* #undef RRTYPE_URI */
302266114Sdes
303246853Sdes/* The size of `time_t', as computed by sizeof. */
304246853Sdes#define SIZEOF_TIME_T 8
305246853Sdes
306246853Sdes/* Define to 1 if you have the ANSI C header files. */
307246853Sdes#define STDC_HEADERS 1
308246853Sdes
309266114Sdes/* Define this to enable messages to stderr. */
310266114Sdes/* #undef STDERR_MSGS */
311266114Sdes
312246853Sdes/* System configuration dir */
313246853Sdes#define SYSCONFDIR sysconfdir
314246853Sdes
315266114Sdes/* Define this to enable DANE support. */
316266114Sdes#define USE_DANE 1
317266114Sdes
318246853Sdes/* Define this to enable ECDSA support. */
319246853Sdes#define USE_ECDSA 1
320246853Sdes
321246853Sdes/* Define this to enable GOST support. */
322246853Sdes#define USE_GOST 1
323246853Sdes
324246853Sdes/* Define this to enable SHA256 and SHA512 support. */
325246853Sdes#define USE_SHA2 1
326246853Sdes
327246853Sdes/* Enable extensions on AIX 3, Interix.  */
328246853Sdes#ifndef _ALL_SOURCE
329246853Sdes# define _ALL_SOURCE 1
330246853Sdes#endif
331246853Sdes/* Enable GNU extensions on systems that have them.  */
332246853Sdes#ifndef _GNU_SOURCE
333246853Sdes# define _GNU_SOURCE 1
334246853Sdes#endif
335246853Sdes/* Enable threading extensions on Solaris.  */
336246853Sdes#ifndef _POSIX_PTHREAD_SEMANTICS
337246853Sdes# define _POSIX_PTHREAD_SEMANTICS 1
338246853Sdes#endif
339246853Sdes/* Enable extensions on HP NonStop.  */
340246853Sdes#ifndef _TANDEM_SOURCE
341246853Sdes# define _TANDEM_SOURCE 1
342246853Sdes#endif
343246853Sdes/* Enable general extensions on Solaris.  */
344246853Sdes#ifndef __EXTENSIONS__
345246853Sdes# define __EXTENSIONS__ 1
346246853Sdes#endif
347246853Sdes
348246853Sdes
349246853Sdes/* Whether the windows socket API is used */
350246853Sdes/* #undef USE_WINSOCK */
351246853Sdes
352246853Sdes/* the version of the windows API enabled */
353246853Sdes#define WINVER 0x0502
354246853Sdes
355246853Sdes/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
356246853Sdes   significant byte first (like Motorola and SPARC, unlike Intel). */
357246853Sdes#if defined AC_APPLE_UNIVERSAL_BUILD
358246853Sdes# if defined __BIG_ENDIAN__
359246853Sdes#  define WORDS_BIGENDIAN 1
360246853Sdes# endif
361246853Sdes#else
362246853Sdes# ifndef WORDS_BIGENDIAN
363246853Sdes/* #  undef WORDS_BIGENDIAN */
364246853Sdes# endif
365246853Sdes#endif
366246853Sdes
367246853Sdes/* Define to 1 if on MINIX. */
368246853Sdes/* #undef _MINIX */
369246853Sdes
370246853Sdes/* Define to 2 if the system does not provide POSIX.1 features except with
371246853Sdes   this defined. */
372246853Sdes/* #undef _POSIX_1_SOURCE */
373246853Sdes
374246853Sdes/* Define to 1 if you need to in order for `stat' and other things to work. */
375246853Sdes/* #undef _POSIX_SOURCE */
376246853Sdes
377246853Sdes/* Define to empty if `const' does not conform to ANSI C. */
378246853Sdes/* #undef const */
379246853Sdes
380246853Sdes/* in_addr_t */
381246853Sdes/* #undef in_addr_t */
382246853Sdes
383246853Sdes/* in_port_t */
384246853Sdes/* #undef in_port_t */
385246853Sdes
386246853Sdes/* Define to `__inline__' or `__inline' if that's what the C compiler
387246853Sdes   calls it, or to nothing if 'inline' is not supported under any name.  */
388246853Sdes#ifndef __cplusplus
389246853Sdes/* #undef inline */
390246853Sdes#endif
391246853Sdes
392246853Sdes/* Define to `short' if <sys/types.h> does not define. */
393246853Sdes/* #undef int16_t */
394246853Sdes
395246853Sdes/* Define to `int' if <sys/types.h> does not define. */
396246853Sdes/* #undef int32_t */
397246853Sdes
398246853Sdes/* Define to `long long' if <sys/types.h> does not define. */
399246853Sdes/* #undef int64_t */
400246853Sdes
401246853Sdes/* Define to `char' if <sys/types.h> does not define. */
402246853Sdes/* #undef int8_t */
403246853Sdes
404266114Sdes/* Define to `size_t' if <sys/types.h> does not define. */
405246853Sdes/* #undef intptr_t */
406246853Sdes
407246853Sdes/* Define to rpl_malloc if the replacement function should be used. */
408246853Sdes/* #undef malloc */
409246853Sdes
410246853Sdes/* Define to `int' if <sys/types.h> does not define. */
411246853Sdes/* #undef pid_t */
412246853Sdes
413246853Sdes/* Define to rpl_realloc if the replacement function should be used. */
414246853Sdes/* #undef realloc */
415246853Sdes
416246853Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */
417246853Sdes/* #undef size_t */
418246853Sdes
419246853Sdes/* Define to 'int' if not defined */
420246853Sdes/* #undef socklen_t */
421246853Sdes
422246853Sdes/* Fallback member name for socket family in struct sockaddr_storage */
423246853Sdes/* #undef ss_family */
424246853Sdes
425246853Sdes/* Define to `int' if <sys/types.h> does not define. */
426246853Sdes/* #undef ssize_t */
427246853Sdes
428246853Sdes/* Define to `unsigned short' if <sys/types.h> does not define. */
429246853Sdes/* #undef uint16_t */
430246853Sdes
431246853Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */
432246853Sdes/* #undef uint32_t */
433246853Sdes
434246853Sdes/* Define to `unsigned long long' if <sys/types.h> does not define. */
435246853Sdes/* #undef uint64_t */
436246853Sdes
437246853Sdes/* Define to `unsigned char' if <sys/types.h> does not define. */
438246853Sdes/* #undef uint8_t */
439246853Sdes
440246853Sdes/* Define as `fork' if `vfork' does not work. */
441246853Sdes/* #undef vfork */
442246853Sdes
443246853Sdes
444246853Sdes#include <stdio.h>
445246853Sdes#include <string.h>
446246853Sdes#include <unistd.h>
447246853Sdes#include <assert.h>
448246853Sdes
449246853Sdes#ifndef LITTLE_ENDIAN
450246853Sdes#define LITTLE_ENDIAN 1234
451246853Sdes#endif
452246853Sdes
453246853Sdes#ifndef BIG_ENDIAN
454246853Sdes#define BIG_ENDIAN 4321
455246853Sdes#endif
456246853Sdes
457246853Sdes#ifndef BYTE_ORDER
458246853Sdes#ifdef WORDS_BIGENDIAN
459246853Sdes#define BYTE_ORDER BIG_ENDIAN
460246853Sdes#else
461246853Sdes#define BYTE_ORDER LITTLE_ENDIAN
462246853Sdes#endif /* WORDS_BIGENDIAN */
463246853Sdes#endif /* BYTE_ORDER */
464246853Sdes
465246853Sdes#if STDC_HEADERS
466246853Sdes#include <stdlib.h>
467246853Sdes#include <stddef.h>
468246853Sdes#endif
469246853Sdes
470246853Sdes#ifdef HAVE_STDINT_H
471246853Sdes#include <stdint.h>
472246853Sdes#endif
473246853Sdes
474246853Sdes#ifdef HAVE_SYS_SOCKET_H
475246853Sdes#include <sys/socket.h>
476246853Sdes#endif
477246853Sdes
478246853Sdes#ifdef HAVE_NETINET_IN_H
479246853Sdes#include <netinet/in.h>
480246853Sdes#endif
481246853Sdes
482246853Sdes#ifdef HAVE_ARPA_INET_H
483246853Sdes#include <arpa/inet.h>
484246853Sdes#endif
485246853Sdes
486246853Sdes#ifdef HAVE_WINSOCK2_H
487246853Sdes#include <winsock2.h>
488246853Sdes#endif
489246853Sdes
490246853Sdes#ifdef HAVE_WS2TCPIP_H
491246853Sdes#include <ws2tcpip.h>
492246853Sdes#endif
493246853Sdes
494246853Sdes
495246853Sdes/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
496246853Sdes#ifdef HAVE_WINSOCK2_H
497246853Sdes#define FD_SET_T (u_int)
498246853Sdes#else
499246853Sdes#define FD_SET_T
500246853Sdes#endif
501246853Sdes
502246853Sdes
503246853Sdes
504246853Sdes
505246853Sdes#ifdef __cplusplus
506246853Sdesextern "C" {
507246853Sdes#endif
508246853Sdes
509266114Sdesint ldns_b64_ntop(uint8_t const *src, size_t srclength,
510266114Sdes	 	  char *target, size_t targsize);
511266114Sdes/**
512266114Sdes * calculates the size needed to store the result of b64_ntop
513266114Sdes */
514266114Sdes/*@unused@*/
515266114Sdesstatic inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
516266114Sdes{
517266114Sdes	return ((((srcsize + 2) / 3) * 4) + 1);
518266114Sdes}
519266114Sdesint ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
520266114Sdes/**
521266114Sdes * calculates the size needed to store the result of ldns_b64_pton
522266114Sdes */
523266114Sdes/*@unused@*/
524266114Sdesstatic inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
525266114Sdes{
526266114Sdes	return (((((srcsize + 3) / 4) * 3)) + 1);
527266114Sdes}
528266114Sdes
529266114Sdes/**
530266114Sdes * Given in dnssec_zone.c, also used in dnssec_sign.c:w
531266114Sdes
532266114Sdes */
533266114Sdesint ldns_dname_compare_v(const void *a, const void *b);
534266114Sdes
535246853Sdes#ifndef HAVE_SLEEP
536246853Sdes/* use windows sleep, in millisecs, instead */
537246853Sdes#define sleep(x) Sleep((x)*1000)
538246853Sdes#endif
539246853Sdes
540246853Sdes#ifndef HAVE_RANDOM
541246853Sdes#define srandom(x) srand(x)
542246853Sdes#define random(x) rand(x)
543246853Sdes#endif
544246853Sdes
545246853Sdes#ifndef HAVE_TIMEGM
546246853Sdes#include <time.h>
547246853Sdestime_t timegm (struct tm *tm);
548246853Sdes#endif /* !TIMEGM */
549246853Sdes#ifndef HAVE_GMTIME_R
550246853Sdesstruct tm *gmtime_r(const time_t *timep, struct tm *result);
551246853Sdes#endif
552246853Sdes#ifndef HAVE_LOCALTIME_R
553246853Sdesstruct tm *localtime_r(const time_t *timep, struct tm *result);
554246853Sdes#endif
555246853Sdes#ifndef HAVE_ISBLANK
556246853Sdesint isblank(int c);
557246853Sdes#endif /* !HAVE_ISBLANK */
558246853Sdes#ifndef HAVE_ISASCII
559246853Sdesint isascii(int c);
560246853Sdes#endif /* !HAVE_ISASCII */
561246853Sdes#ifndef HAVE_SNPRINTF
562246853Sdes#include <stdarg.h>
563246853Sdesint snprintf (char *str, size_t count, const char *fmt, ...);
564246853Sdesint vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
565246853Sdes#endif /* HAVE_SNPRINTF */
566246853Sdes#ifndef HAVE_INET_PTON
567246853Sdesint inet_pton(int af, const char* src, void* dst);
568246853Sdes#endif /* HAVE_INET_PTON */
569246853Sdes#ifndef HAVE_INET_NTOP
570246853Sdesconst char *inet_ntop(int af, const void *src, char *dst, size_t size);
571246853Sdes#endif
572246853Sdes#ifndef HAVE_INET_ATON
573246853Sdesint inet_aton(const char *cp, struct in_addr *addr);
574246853Sdes#endif
575246853Sdes#ifndef HAVE_MEMMOVE
576246853Sdesvoid *memmove(void *dest, const void *src, size_t n);
577246853Sdes#endif
578246853Sdes#ifndef HAVE_STRLCPY
579246853Sdessize_t strlcpy(char *dst, const char *src, size_t siz);
580246853Sdes#endif
581246853Sdes#ifdef __cplusplus
582246853Sdes}
583246853Sdes#endif
584246853Sdes#ifndef HAVE_GETADDRINFO
585246853Sdes#include "compat/fake-rfc2553.h"
586246853Sdes#endif
587246853Sdes#ifndef HAVE_STRTOUL
588246853Sdes#define strtoul (unsigned long)strtol
589246853Sdes#endif
590246853Sdes
591