config.h
Go to the documentation of this file.
1/* ldns/config.h. Generated from config.h.in by configure. */
2/* ldns/config.h.in. Generated from configure.ac by autoheader. */
3
4/* Define if building universal (internal helper macro) */
5/* #undef AC_APPLE_UNIVERSAL_BUILD */
6
7/* Define to 1 if you have the <arpa/inet.h> header file. */
8#define HAVE_ARPA_INET_H 1
9
10/* Define to 1 if you have the `asctime_r' function. */
11#define HAVE_ASCTIME_R 1
12
13/* Whether the C compiler accepts the "format" attribute */
14#define HAVE_ATTR_FORMAT 1
15
16/* Whether the C compiler accepts the "unused" attribute */
17#define HAVE_ATTR_UNUSED 1
18
19/* Define to 1 if you have the `b32_ntop' function. */
20/* #undef HAVE_B32_NTOP */
21
22/* Define to 1 if you have the `b32_pton' function. */
23/* #undef HAVE_B32_PTON */
24
25/* Define to 1 if you have the `b64_ntop' function. */
26/* #undef HAVE_B64_NTOP */
27
28/* Define to 1 if you have the `b64_pton' function. */
29/* #undef HAVE_B64_PTON */
30
31/* Define to 1 if you have the `bzero' function. */
32#define HAVE_BZERO 1
33
34/* Define to 1 if you have the `calloc' function. */
35#define HAVE_CALLOC 1
36
37/* Define to 1 if you have the `CONF_modules_unload' function. */
38#define HAVE_CONF_MODULES_UNLOAD 1
39
40/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
41/* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */
42
43/* Define to 1 if you have the `CRYPTO_memcmp' function. */
44#define HAVE_CRYPTO_MEMCMP 1
45
46/* Define to 1 if you have the `ctime_r' function. */
47#define HAVE_CTIME_R 1
48
49/* Is a CAFILE given at configure time */
50#define HAVE_DANE_CA_FILE 0
51
52/* Is a CAPATH given at configure time */
53#define HAVE_DANE_CA_PATH 0
54
55/* Define to 1 if you have the declaration of `EVP_PKEY_base_id', and to 0 if
56 you don't. */
57#define HAVE_DECL_EVP_PKEY_BASE_ID 1
58
59/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
60 don't. */
61#define HAVE_DECL_INET_NTOP 1
62
63/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
64 don't. */
65#define HAVE_DECL_INET_PTON 1
66
67/* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
68 don't. */
69#define HAVE_DECL_NID_ED25519 1
70
71/* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you
72 don't. */
73#define HAVE_DECL_NID_ED448 1
74
75/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
76 don't. */
77#define HAVE_DECL_NID_SECP384R1 1
78
79/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
80 if you don't. */
81#define HAVE_DECL_NID_X9_62_PRIME256V1 1
82
83/* Define to 1 if you have the <dlfcn.h> header file. */
84#define HAVE_DLFCN_H 1
85
86/* Define to 1 if you have the `DSA_get0_key' function. */
87#define HAVE_DSA_GET0_KEY 1
88
89/* Define to 1 if you have the `DSA_get0_pqg' function. */
90#define HAVE_DSA_GET0_PQG 1
91
92/* Define to 1 if you have the `DSA_SIG_get0' function. */
93#define HAVE_DSA_SIG_GET0 1
94
95/* Define to 1 if you have the `DSA_SIG_set0' function. */
96#define HAVE_DSA_SIG_SET0 1
97
98/* Define to 1 if you have the `ECDSA_SIG_get0' function. */
99#define HAVE_ECDSA_SIG_GET0 1
100
101/* Define to 1 if you have the `endprotoent' function. */
102#define HAVE_ENDPROTOENT 1
103
104/* Define to 1 if you have the `endservent' function. */
105#define HAVE_ENDSERVENT 1
106
107/* Define to 1 if you have the `ENGINE_cleanup' function. */
108/* #undef HAVE_ENGINE_CLEANUP */
109
110/* Define to 1 if you have the `ENGINE_free' function. */
111#define HAVE_ENGINE_FREE 1
112
113/* Define to 1 if you have the `ERR_free_strings' function. */
114/* #undef HAVE_ERR_FREE_STRINGS */
115
116/* Define to 1 if you have the `ERR_load_crypto_strings' function. */
117/* #undef HAVE_ERR_LOAD_CRYPTO_STRINGS */
118
119/* Define to 1 if you have the `EVP_cleanup' function. */
120/* #undef HAVE_EVP_CLEANUP */
121
122/* Define to 1 if you have the `EVP_dss1' function. */
123/* #undef HAVE_EVP_DSS1 */
124
125/* Define to 1 if you have the `EVP_MD_CTX_new' function. */
126#define HAVE_EVP_MD_CTX_NEW 1
127
128/* Define to 1 if you have the EVP_PKEY_base_id function or macro. */
129#define HAVE_EVP_PKEY_BASE_ID 1
130
131/* Define to 1 if you have the `EVP_PKEY_get_base_id' function. */
132#define HAVE_EVP_PKEY_GET_BASE_ID 1
133
134/* Define to 1 if you have the `EVP_PKEY_keygen' function. */
135#define HAVE_EVP_PKEY_KEYGEN 1
136
137/* Define to 1 if you have the `EVP_sha256' function. */
138#define HAVE_EVP_SHA256 1
139
140/* Define to 1 if you have the `EVP_sha384' function. */
141#define HAVE_EVP_SHA384 1
142
143/* Define to 1 if you have the `EVP_sha512' function. */
144#define HAVE_EVP_SHA512 1
145
146/* Define to 1 if you have the `fcntl' function. */
147#define HAVE_FCNTL 1
148
149/* Define to 1 if you have the `fork' function. */
150#define HAVE_FORK 1
151
152/* if fork is available for compile */
153#define HAVE_FORK_AVAILABLE 1
154
155/* Whether getaddrinfo is available */
156#define HAVE_GETADDRINFO 1
157
158/* Define to 1 if you have the <getopt.h> header file. */
159#define HAVE_GETOPT_H 1
160
161/* Define to 1 if you have the `gmtime_r' function. */
162#define HAVE_GMTIME_R 1
163
164/* Define to 1 if you have the `inet_aton' function. */
165#define HAVE_INET_ATON 1
166
167/* Define to 1 if you have the `inet_ntop' function. */
168#define HAVE_INET_NTOP 1
169
170/* Define to 1 if you have the `inet_pton' function. */
171#define HAVE_INET_PTON 1
172
173/* define if you have inttypes.h */
174#define HAVE_INTTYPES_H 1
175
176/* if the function 'ioctlsocket' is available */
177/* #undef HAVE_IOCTLSOCKET */
178
179/* Define to 1 if you have the `isascii' function. */
180#define HAVE_ISASCII 1
181
182/* Define to 1 if you have the `isblank' function. */
183#define HAVE_ISBLANK 1
184
185/* Define to 1 if you have the `pcap' library (-lpcap). */
186/* #undef HAVE_LIBPCAP */
187
188/* Define if we have LibreSSL */
189/* #undef HAVE_LIBRESSL */
190
191/* Define to 1 if you have the `localtime_r' function. */
192#define HAVE_LOCALTIME_R 1
193
194/* Define to 1 if you have the `memmove' function. */
195#define HAVE_MEMMOVE 1
196
197/* Define to 1 if you have the `memset' function. */
198#define HAVE_MEMSET 1
199
200/* Define to 1 if you have the <minix/config.h> header file. */
201/* #undef HAVE_MINIX_CONFIG_H */
202
203/* Define to 1 if you have the <netdb.h> header file. */
204#define HAVE_NETDB_H 1
205
206/* Define to 1 if you have the <netinet/if_ether.h> header file. */
207/* #undef HAVE_NETINET_IF_ETHER_H */
208
209/* Define to 1 if you have the <netinet/igmp.h> header file. */
210/* #undef HAVE_NETINET_IGMP_H */
211
212/* Define to 1 if you have the <netinet/in.h> header file. */
213#define HAVE_NETINET_IN_H 1
214
215/* Define to 1 if you have the <netinet/in_systm.h> header file. */
216/* #undef HAVE_NETINET_IN_SYSTM_H */
217
218/* Define to 1 if you have the <netinet/ip6.h> header file. */
219/* #undef HAVE_NETINET_IP6_H */
220
221/* Define to 1 if you have the <netinet/ip_compat.h> header file. */
222/* #undef HAVE_NETINET_IP_COMPAT_H */
223
224/* Define to 1 if you have the <netinet/ip.h> header file. */
225/* #undef HAVE_NETINET_IP_H */
226
227/* Define to 1 if you have the <netinet/udp.h> header file. */
228/* #undef HAVE_NETINET_UDP_H */
229
230/* Define to 1 if you have the <net/ethernet.h> header file. */
231/* #undef HAVE_NET_ETHERNET_H */
232
233/* Define to 1 if you have the <net/if.h> header file. */
234/* #undef HAVE_NET_IF_H */
235
236/* Define to 1 if you have the <openssl/conf.h> header file. */
237#define HAVE_OPENSSL_CONF_H 1
238
239/* Define to 1 if you have the <openssl/engine.h> header file. */
240#define HAVE_OPENSSL_ENGINE_H 1
241
242/* Define to 1 if you have the <openssl/err.h> header file. */
243#define HAVE_OPENSSL_ERR_H 1
244
245/* Define to 1 if you have the <openssl/evp.h> header file. */
246#define HAVE_OPENSSL_EVP_H 1
247
248/* Define to 1 if you have the `OPENSSL_init_crypto' function. */
249#define HAVE_OPENSSL_INIT_CRYPTO 1
250
251/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
252/* #undef HAVE_OPENSSL_INIT_SSL */
253
254/* Define to 1 if you have the <openssl/rand.h> header file. */
255#define HAVE_OPENSSL_RAND_H 1
256
257/* Define to 1 if you have the <openssl/ssl.h> header file. */
258#define HAVE_OPENSSL_SSL_H 1
259
260/* Define to 1 if you have the <pcap.h> header file. */
261/* #undef HAVE_PCAP_H */
262
263/* This platform supports poll(7). */
264#define HAVE_POLL 1
265
266/* If available, contains the Python version number currently in use. */
267/* #undef HAVE_PYTHON */
268
269/* Define to 1 if you have the `random' function. */
270#define HAVE_RANDOM 1
271
272/* Define to 1 if you have the `sleep' function. */
273#define HAVE_SLEEP 1
274
275/* Define to 1 if you have the `snprintf' function. */
276#define HAVE_SNPRINTF 1
277
278/* Define if you have the SSL libraries installed. */
279#define HAVE_SSL
280
281/* Define to 1 if you have the <stdarg.h> header file. */
282#define HAVE_STDARG_H 1
283
284/* Define to 1 if stdbool.h conforms to C99. */
285#define HAVE_STDBOOL_H 1
286
287/* Define to 1 if you have the <stdint.h> header file. */
288#define HAVE_STDINT_H 1
289
290/* Define to 1 if you have the <stdio.h> header file. */
291#define HAVE_STDIO_H 1
292
293/* Define to 1 if you have the <stdlib.h> header file. */
294#define HAVE_STDLIB_H 1
295
296/* Define to 1 if you have the <strings.h> header file. */
297#define HAVE_STRINGS_H 1
298
299/* Define to 1 if you have the <string.h> header file. */
300#define HAVE_STRING_H 1
301
302/* Define to 1 if you have the `strlcpy' function. */
303#define HAVE_STRLCPY 1
304
305/* Define to 1 if you have the `strtoul' function. */
306#define HAVE_STRTOUL 1
307
308/* Define if you have SWIG libraries and header files. */
309/* #undef HAVE_SWIG */
310
311/* Define to 1 if you have the `symlink' function. */
312#define HAVE_SYMLINK 1
313
314/* Define to 1 if you have the <sys/mount.h> header file. */
315#define HAVE_SYS_MOUNT_H 1
316
317/* Define to 1 if you have the <sys/param.h> header file. */
318#define HAVE_SYS_PARAM_H 1
319
320/* define if you have sys/socket.h */
321#define HAVE_SYS_SOCKET_H 1
322
323/* Define to 1 if you have the <sys/stat.h> header file. */
324#define HAVE_SYS_STAT_H 1
325
326/* define if you have sys/types.h */
327#define HAVE_SYS_TYPES_H 1
328
329/* Define to 1 if you have the <TargetConditionals.h> header file. */
330/* #undef HAVE_TARGETCONDITIONALS_H */
331
332/* Define to 1 if you have the `timegm' function. */
333#define HAVE_TIMEGM 1
334
335/* Define to 1 if you have the <time.h> header file. */
336#define HAVE_TIME_H 1
337
338/* define if you have unistd.h */
339#define HAVE_UNISTD_H 1
340
341/* Define to 1 if you have the `vfork' function. */
342#define HAVE_VFORK 1
343
344/* Define to 1 if you have the <vfork.h> header file. */
345/* #undef HAVE_VFORK_H */
346
347/* Define to 1 if you have the <wchar.h> header file. */
348#define HAVE_WCHAR_H 1
349
350/* Define to 1 if you have the <winsock2.h> header file. */
351/* #undef HAVE_WINSOCK2_H */
352
353/* Define to 1 if `fork' works. */
354#define HAVE_WORKING_FORK 1
355
356/* Define to 1 if `vfork' works. */
357#define HAVE_WORKING_VFORK 1
358
359/* Define to 1 if you have the <ws2tcpip.h> header file. */
360/* #undef HAVE_WS2TCPIP_H */
361
362/* Define to 1 if the system has the type `_Bool'. */
363#define HAVE__BOOL 1
364
365/* Is a CAFILE given at configure time */
366/* #undef LDNS_DANE_CA_FILE */
367
368/* Is a CAPATH given at configure time */
369/* #undef LDNS_DANE_CA_PATH */
370
371/* Define to the sub-directory where libtool stores uninstalled libraries. */
372#define LT_OBJDIR ".libs/"
373
374/* Define to the address where bug reports for this package should be sent. */
375#define PACKAGE_BUGREPORT "dns-team@nlnetlabs.nl"
376
377/* Define to the full name of this package. */
378#define PACKAGE_NAME "ldns"
379
380/* Define to the full name and version of this package. */
381#define PACKAGE_STRING "ldns 1.8.4"
382
383/* Define to the one symbol short name of this package. */
384#define PACKAGE_TARNAME "libdns"
385
386/* Define to the home page for this package. */
387#define PACKAGE_URL ""
388
389/* Define to the version of this package. */
390#define PACKAGE_VERSION "1.8.4"
391
392/* Define this to enable RR type AMTRELAY. */
393#define RRTYPE_AMTRELAY
394
395/* Define this to enable RR type AVC. */
396/* #undef RRTYPE_AVC */
397
398/* Define this to enable RR type DOA. */
399/* #undef RRTYPE_DOA */
400
401/* Define this to enable RR type NINFO. */
402/* #undef RRTYPE_NINFO */
403
404/* Define this to enable RR type OPENPGPKEY. */
405#define RRTYPE_OPENPGPKEY
406
407/* Define this to enable RR type RESINFO. */
408#define RRTYPE_RESINFO
409
410/* Define this to enable RR type RKEY. */
411/* #undef RRTYPE_RKEY */
412
413/* Define this to enable RR types SVCB and HTTPS. */
414#define RRTYPE_SVCB_HTTPS
415
416/* Define this to enable RR type TA. */
417/* #undef RRTYPE_TA */
418
419/* The size of `time_t', as computed by sizeof. */
420#define SIZEOF_TIME_T 8
421
422/* Define to 1 if all of the C90 standard headers exist (not just the ones
423 required in a freestanding environment). This macro is provided for
424 backward compatibility; new code need not use it. */
425#define STDC_HEADERS 1
426
427/* Define this to enable messages to stderr. */
428/* #undef STDERR_MSGS */
429
430/* System configuration dir */
431#define SYSCONFDIR sysconfdir
432
433/* Define this to enable DANE support. */
434#define USE_DANE 1
435
436/* Define this to enable DANE-TA usage type support. */
437/* #undef USE_DANE_TA_USAGE */
438
439/* Define this to enable DANE verify support. */
440/* #undef USE_DANE_VERIFY */
441
442/* Define this to enable DSA support. */
443#define USE_DSA 1
444
445/* Define this to enable ECDSA support. */
446#define USE_ECDSA 1
447
448/* Define this to enable ED25519 support. */
449#define USE_ED25519 1
450
451/* Define this to enable ED448 support. */
452#define USE_ED448 1
453
454/* Define this to enable GOST support. */
455#define USE_GOST 1
456
457/* Define this to enable SHA256 and SHA512 support. */
458#define USE_SHA2 1
459
460/* Enable extensions on AIX 3, Interix. */
461#ifndef _ALL_SOURCE
462# define _ALL_SOURCE 1
463#endif
464/* Enable general extensions on macOS. */
465#ifndef _DARWIN_C_SOURCE
466# define _DARWIN_C_SOURCE 1
467#endif
468/* Enable general extensions on Solaris. */
469#ifndef __EXTENSIONS__
470# define __EXTENSIONS__ 1
471#endif
472/* Enable GNU extensions on systems that have them. */
473#ifndef _GNU_SOURCE
474# define _GNU_SOURCE 1
475#endif
476/* Enable X/Open compliant socket functions that do not require linking
477 with -lxnet on HP-UX 11.11. */
478#ifndef _HPUX_ALT_XOPEN_SOCKET_API
479# define _HPUX_ALT_XOPEN_SOCKET_API 1
480#endif
481/* Identify the host operating system as Minix.
482 This macro does not affect the system headers' behavior.
483 A future release of Autoconf may stop defining this macro. */
484#ifndef _MINIX
485/* # undef _MINIX */
486#endif
487/* Enable general extensions on NetBSD.
488 Enable NetBSD compatibility extensions on Minix. */
489#ifndef _NETBSD_SOURCE
490# define _NETBSD_SOURCE 1
491#endif
492/* Enable OpenBSD compatibility extensions on NetBSD.
493 Oddly enough, this does nothing on OpenBSD. */
494#ifndef _OPENBSD_SOURCE
495# define _OPENBSD_SOURCE 1
496#endif
497/* Define to 1 if needed for POSIX-compatible behavior. */
498#ifndef _POSIX_SOURCE
499/* # undef _POSIX_SOURCE */
500#endif
501/* Define to 2 if needed for POSIX-compatible behavior. */
502#ifndef _POSIX_1_SOURCE
503/* # undef _POSIX_1_SOURCE */
504#endif
505/* Enable POSIX-compatible threading on Solaris. */
506#ifndef _POSIX_PTHREAD_SEMANTICS
507# define _POSIX_PTHREAD_SEMANTICS 1
508#endif
509/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
510#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
511# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
512#endif
513/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
514#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
515# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
516#endif
517/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
518#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
519# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
520#endif
521/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
522#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
523# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
524#endif
525/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
526#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
527# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
528#endif
529/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
530#ifndef __STDC_WANT_LIB_EXT2__
531# define __STDC_WANT_LIB_EXT2__ 1
532#endif
533/* Enable extensions specified by ISO/IEC 24747:2009. */
534#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
535# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
536#endif
537/* Enable extensions on HP NonStop. */
538#ifndef _TANDEM_SOURCE
539# define _TANDEM_SOURCE 1
540#endif
541/* Enable X/Open extensions. Define to 500 only if necessary
542 to make mbstate_t available. */
543#ifndef _XOPEN_SOURCE
544/* # undef _XOPEN_SOURCE */
545#endif
546
547
548/* Whether the windows socket API is used */
549/* #undef USE_WINSOCK */
550
551/* the version of the windows API enabled */
552#define WINVER 0x0502
553
554/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
555 significant byte first (like Motorola and SPARC, unlike Intel). */
556#if defined AC_APPLE_UNIVERSAL_BUILD
557# if defined __BIG_ENDIAN__
558# define WORDS_BIGENDIAN 1
559# endif
560#else
561# ifndef WORDS_BIGENDIAN
562/* # undef WORDS_BIGENDIAN */
563# endif
564#endif
565
566/* Enable for compile on Minix */
567#define _NETBSD_SOURCE 1
568
569/* Define to empty if `const' does not conform to ANSI C. */
570/* #undef const */
571
572/* in_addr_t */
573/* #undef in_addr_t */
574
575/* in_port_t */
576/* #undef in_port_t */
577
578/* Define to `__inline__' or `__inline' if that's what the C compiler
579 calls it, or to nothing if 'inline' is not supported under any name. */
580#ifndef __cplusplus
581/* #undef inline */
582#endif
583
584/* Define to `short' if <sys/types.h> does not define. */
585/* #undef int16_t */
586
587/* Define to `int' if <sys/types.h> does not define. */
588/* #undef int32_t */
589
590/* Define to `long long' if <sys/types.h> does not define. */
591/* #undef int64_t */
592
593/* Define to `char' if <sys/types.h> does not define. */
594/* #undef int8_t */
595
596/* Define to `size_t' if <sys/types.h> does not define. */
597/* #undef intptr_t */
598
599/* Define as a signed integer type capable of holding a process identifier. */
600/* #undef pid_t */
601
602/* Define to `unsigned int' if <sys/types.h> does not define. */
603/* #undef size_t */
604
605/* Define to 'int' if not defined */
606/* #undef socklen_t */
607
608/* Fallback member name for socket family in struct sockaddr_storage */
609/* #undef ss_family */
610
611/* Define to `int' if <sys/types.h> does not define. */
612/* #undef ssize_t */
613
614/* Define to `unsigned short' if <sys/types.h> does not define. */
615/* #undef uint16_t */
616
617/* Define to `unsigned int' if <sys/types.h> does not define. */
618/* #undef uint32_t */
619
620/* Define to `unsigned long long' if <sys/types.h> does not define. */
621/* #undef uint64_t */
622
623/* Define to `unsigned char' if <sys/types.h> does not define. */
624/* #undef uint8_t */
625
626/* Define as `fork' if `vfork' does not work. */
627/* #undef vfork */
628
629
630#include <stdio.h>
631#include <string.h>
632#include <unistd.h>
633#include <assert.h>
634
635#ifndef LITTLE_ENDIAN
636#define LITTLE_ENDIAN 1234
637#endif
638
639#ifndef BIG_ENDIAN
640#define BIG_ENDIAN 4321
641#endif
642
643#ifndef BYTE_ORDER
644#ifdef WORDS_BIGENDIAN
645#define BYTE_ORDER BIG_ENDIAN
646#else
647#define BYTE_ORDER LITTLE_ENDIAN
648#endif /* WORDS_BIGENDIAN */
649#endif /* BYTE_ORDER */
650
651#if STDC_HEADERS
652#include <stdlib.h>
653#include <stddef.h>
654#endif
655
656#ifdef HAVE_STDINT_H
657#include <stdint.h>
658#endif
659
660#ifdef HAVE_SYS_SOCKET_H
661#include <sys/socket.h>
662#endif
663
664#ifdef HAVE_NETINET_IN_H
665#include <netinet/in.h>
666#endif
667
668#ifdef HAVE_ARPA_INET_H
669#include <arpa/inet.h>
670#endif
671
672#ifdef HAVE_WINSOCK2_H
673#include <winsock2.h>
674#endif
675
676#ifdef HAVE_WS2TCPIP_H
677#include <ws2tcpip.h>
678#endif
679
680
681/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
682#ifdef HAVE_WINSOCK2_H
683#define FD_SET_T (u_int)
684#else
685#define FD_SET_T
686#endif
687
688
689
690
691#ifdef __cplusplus
692extern "C" {
693#endif
694
695int ldns_b64_ntop(uint8_t const *src, size_t srclength,
696 char *target, size_t targsize);
700/*@unused@*/
701static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
702{
703 return ((((srcsize + 2) / 3) * 4) + 1);
704}
705int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
709/*@unused@*/
710static inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
711{
712 return (((((srcsize + 3) / 4) * 3)) + 1);
713}
714
719int ldns_dname_compare_v(const void *a, const void *b);
720
721#ifndef HAVE_SLEEP
722/* use windows sleep, in millisecs, instead */
723#define sleep(x) Sleep((x)*1000)
724#endif
725
726#ifndef HAVE_RANDOM
727#define srandom(x) srand(x)
728#define random(x) rand(x)
729#endif
730
731#ifndef HAVE_TIMEGM
732#include <time.h>
733time_t timegm (struct tm *tm);
734#endif /* !TIMEGM */
735#ifndef HAVE_GMTIME_R
736struct tm *gmtime_r(const time_t *timep, struct tm *result);
737#endif
738#ifndef HAVE_ASCTIME_R
739char *asctime_r(const struct tm *tm, char *buf);
740#endif
741#ifndef HAVE_LOCALTIME_R
742struct tm *localtime_r(const time_t *timep, struct tm *result);
743#endif
744#ifndef HAVE_ISBLANK
745int isblank(int c);
746#endif /* !HAVE_ISBLANK */
747#ifndef HAVE_ISASCII
748int isascii(int c);
749#endif /* !HAVE_ISASCII */
750#ifndef HAVE_SNPRINTF
751#include <stdarg.h>
752int snprintf (char *str, size_t count, const char *fmt, ...);
753int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
754#endif /* HAVE_SNPRINTF */
755#if !defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
756int inet_pton(int af, const char* src, void* dst);
757#endif /* HAVE_INET_PTON */
758#if !defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
759const char *inet_ntop(int af, const void *src, char *dst, size_t size);
760#endif
761#ifndef HAVE_INET_ATON
762int inet_aton(const char *cp, struct in_addr *addr);
763#endif
764#ifndef HAVE_MEMMOVE
765void *memmove(void *dest, const void *src, size_t n);
766#endif
767#ifndef HAVE_STRLCPY
768size_t strlcpy(char *dst, const char *src, size_t siz);
769#endif
770
771#ifdef USE_WINSOCK
772#define SOCK_INVALID ((INT_PTR)INVALID_SOCKET)
773#define close_socket(_s) do { if (_s != SOCK_INVALID) {closesocket(_s); _s = -1;} } while(0)
774#else
775#define SOCK_INVALID -1
776#define close_socket(_s) do { if (_s != SOCK_INVALID) {close(_s); _s = -1;} } while(0)
777#endif
778
779#ifdef __cplusplus
780}
781#endif
782#ifndef HAVE_GETADDRINFO
783#include "compat/fake-rfc2553.h"
784#endif
785#ifndef HAVE_STRTOUL
786#define strtoul (unsigned long)strtol
787#endif
788
int ldns_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize)
int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize)
int ldns_dname_compare_v(const void *a, const void *b)
Given in dnssec_zone.c, also used in dnssec_sign.c:w.