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.9.0"
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.9.0"
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 types CLA and IPN. */
399/* #undef RRTYPE_CLA_IPN */
400
401/* Define this to enable RR type DOA. */
402/* #undef RRTYPE_DOA */
403
404/* Define this to enable RR type DSYNC. */
405#define RRTYPE_DSYNC
406
407/* Define this to enable RR types HHIT and BRID. */
408/* #undef RRTYPE_HHIT_BRID */
409
410/* Define this to enable RR type NINFO. */
411/* #undef RRTYPE_NINFO */
412
413/* Define this to enable RR type OPENPGPKEY. */
414#define RRTYPE_OPENPGPKEY
415
416/* Define this to enable RR type RESINFO. */
417#define RRTYPE_RESINFO
418
419/* Define this to enable RR type RKEY. */
420/* #undef RRTYPE_RKEY */
421
422/* Define this to enable RR types SVCB and HTTPS. */
423#define RRTYPE_SVCB_HTTPS
424
425/* Define this to enable RR type TA. */
426/* #undef RRTYPE_TA */
427
428/* The size of `time_t', as computed by sizeof. */
429#define SIZEOF_TIME_T 8
430
431/* Define to 1 if all of the C90 standard headers exist (not just the ones
432 required in a freestanding environment). This macro is provided for
433 backward compatibility; new code need not use it. */
434#define STDC_HEADERS 1
435
436/* Define this to enable messages to stderr. */
437/* #undef STDERR_MSGS */
438
439/* System configuration dir */
440#define SYSCONFDIR sysconfdir
441
442/* Define this to enable DANE support. */
443#define USE_DANE 1
444
445/* Define this to enable DANE-TA usage type support. */
446/* #undef USE_DANE_TA_USAGE */
447
448/* Define this to enable DANE verify support. */
449/* #undef USE_DANE_VERIFY */
450
451/* Define this to enable DSA support. */
452#define USE_DSA 1
453
454/* Define this to enable ECDSA support. */
455#define USE_ECDSA 1
456
457/* Define this to enable ED25519 support. */
458#define USE_ED25519 1
459
460/* Define this to enable ED448 support. */
461#define USE_ED448 1
462
463/* Define this to enable GOST support. */
464#define USE_GOST 1
465
466/* Define this to enable SHA256 and SHA512 support. */
467#define USE_SHA2 1
468
469/* Enable extensions on AIX 3, Interix. */
470#ifndef _ALL_SOURCE
471# define _ALL_SOURCE 1
472#endif
473/* Enable general extensions on macOS. */
474#ifndef _DARWIN_C_SOURCE
475# define _DARWIN_C_SOURCE 1
476#endif
477/* Enable general extensions on Solaris. */
478#ifndef __EXTENSIONS__
479# define __EXTENSIONS__ 1
480#endif
481/* Enable GNU extensions on systems that have them. */
482#ifndef _GNU_SOURCE
483# define _GNU_SOURCE 1
484#endif
485/* Enable X/Open compliant socket functions that do not require linking
486 with -lxnet on HP-UX 11.11. */
487#ifndef _HPUX_ALT_XOPEN_SOCKET_API
488# define _HPUX_ALT_XOPEN_SOCKET_API 1
489#endif
490/* Identify the host operating system as Minix.
491 This macro does not affect the system headers' behavior.
492 A future release of Autoconf may stop defining this macro. */
493#ifndef _MINIX
494/* # undef _MINIX */
495#endif
496/* Enable general extensions on NetBSD.
497 Enable NetBSD compatibility extensions on Minix. */
498#ifndef _NETBSD_SOURCE
499# define _NETBSD_SOURCE 1
500#endif
501/* Enable OpenBSD compatibility extensions on NetBSD.
502 Oddly enough, this does nothing on OpenBSD. */
503#ifndef _OPENBSD_SOURCE
504# define _OPENBSD_SOURCE 1
505#endif
506/* Define to 1 if needed for POSIX-compatible behavior. */
507#ifndef _POSIX_SOURCE
508/* # undef _POSIX_SOURCE */
509#endif
510/* Define to 2 if needed for POSIX-compatible behavior. */
511#ifndef _POSIX_1_SOURCE
512/* # undef _POSIX_1_SOURCE */
513#endif
514/* Enable POSIX-compatible threading on Solaris. */
515#ifndef _POSIX_PTHREAD_SEMANTICS
516# define _POSIX_PTHREAD_SEMANTICS 1
517#endif
518/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
519#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
520# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
521#endif
522/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
523#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
524# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
525#endif
526/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
527#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
528# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
529#endif
530/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
531#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
532# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
533#endif
534/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
535#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
536# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
537#endif
538/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
539#ifndef __STDC_WANT_LIB_EXT2__
540# define __STDC_WANT_LIB_EXT2__ 1
541#endif
542/* Enable extensions specified by ISO/IEC 24747:2009. */
543#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
544# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
545#endif
546/* Enable extensions on HP NonStop. */
547#ifndef _TANDEM_SOURCE
548# define _TANDEM_SOURCE 1
549#endif
550/* Enable X/Open extensions. Define to 500 only if necessary
551 to make mbstate_t available. */
552#ifndef _XOPEN_SOURCE
553/* # undef _XOPEN_SOURCE */
554#endif
555
556
557/* Whether the windows socket API is used */
558/* #undef USE_WINSOCK */
559
560/* the version of the windows API enabled */
561#define WINVER 0x0502
562
563/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
564 significant byte first (like Motorola and SPARC, unlike Intel). */
565#if defined AC_APPLE_UNIVERSAL_BUILD
566# if defined __BIG_ENDIAN__
567# define WORDS_BIGENDIAN 1
568# endif
569#else
570# ifndef WORDS_BIGENDIAN
571/* # undef WORDS_BIGENDIAN */
572# endif
573#endif
574
575/* Enable for compile on Minix */
576#define _NETBSD_SOURCE 1
577
578/* Define to empty if `const' does not conform to ANSI C. */
579/* #undef const */
580
581/* in_addr_t */
582/* #undef in_addr_t */
583
584/* in_port_t */
585/* #undef in_port_t */
586
587/* Define to `__inline__' or `__inline' if that's what the C compiler
588 calls it, or to nothing if 'inline' is not supported under any name. */
589#ifndef __cplusplus
590/* #undef inline */
591#endif
592
593/* Define to `short' if <sys/types.h> does not define. */
594/* #undef int16_t */
595
596/* Define to `int' if <sys/types.h> does not define. */
597/* #undef int32_t */
598
599/* Define to `long long' if <sys/types.h> does not define. */
600/* #undef int64_t */
601
602/* Define to `char' if <sys/types.h> does not define. */
603/* #undef int8_t */
604
605/* Define to `size_t' if <sys/types.h> does not define. */
606/* #undef intptr_t */
607
608/* Define as a signed integer type capable of holding a process identifier. */
609/* #undef pid_t */
610
611/* Define to `unsigned int' if <sys/types.h> does not define. */
612/* #undef size_t */
613
614/* Define to 'int' if not defined */
615/* #undef socklen_t */
616
617/* Fallback member name for socket family in struct sockaddr_storage */
618/* #undef ss_family */
619
620/* Define to `int' if <sys/types.h> does not define. */
621/* #undef ssize_t */
622
623/* Define to `unsigned short' if <sys/types.h> does not define. */
624/* #undef uint16_t */
625
626/* Define to `unsigned int' if <sys/types.h> does not define. */
627/* #undef uint32_t */
628
629/* Define to `unsigned long long' if <sys/types.h> does not define. */
630/* #undef uint64_t */
631
632/* Define to `unsigned char' if <sys/types.h> does not define. */
633/* #undef uint8_t */
634
635/* Define as `fork' if `vfork' does not work. */
636/* #undef vfork */
637
638
639#include <stdio.h>
640#include <string.h>
641#include <unistd.h>
642#include <assert.h>
643
644#ifndef LITTLE_ENDIAN
645#define LITTLE_ENDIAN 1234
646#endif
647
648#ifndef BIG_ENDIAN
649#define BIG_ENDIAN 4321
650#endif
651
652#ifndef BYTE_ORDER
653#ifdef WORDS_BIGENDIAN
654#define BYTE_ORDER BIG_ENDIAN
655#else
656#define BYTE_ORDER LITTLE_ENDIAN
657#endif /* WORDS_BIGENDIAN */
658#endif /* BYTE_ORDER */
659
660#if STDC_HEADERS
661#include <stdlib.h>
662#include <stddef.h>
663#endif
664
665#ifdef HAVE_STDINT_H
666#include <stdint.h>
667#endif
668
669#ifdef HAVE_SYS_SOCKET_H
670#include <sys/socket.h>
671#endif
672
673#ifdef HAVE_NETINET_IN_H
674#include <netinet/in.h>
675#endif
676
677#ifdef HAVE_ARPA_INET_H
678#include <arpa/inet.h>
679#endif
680
681#ifdef HAVE_WINSOCK2_H
682#include <winsock2.h>
683#endif
684
685#ifdef HAVE_WS2TCPIP_H
686#include <ws2tcpip.h>
687#endif
688
689
690/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
691#ifdef HAVE_WINSOCK2_H
692#define FD_SET_T (u_int)
693#else
694#define FD_SET_T
695#endif
696
697
698
699
700#ifdef __cplusplus
701extern "C" {
702#endif
703
704int ldns_b64_ntop(uint8_t const *src, size_t srclength,
705 char *target, size_t targsize);
709/*@unused@*/
710static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
711{
712 return ((((srcsize + 2) / 3) * 4) + 1);
713}
714int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
718/*@unused@*/
719static inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
720{
721 return (((((srcsize + 3) / 4) * 3)) + 1);
722}
723
728int ldns_dname_compare_v(const void *a, const void *b);
729
730#ifndef HAVE_SLEEP
731/* use windows sleep, in millisecs, instead */
732#define sleep(x) Sleep((x)*1000)
733#endif
734
735#ifndef HAVE_RANDOM
736#define srandom(x) srand(x)
737#define random(x) rand(x)
738#endif
739
740#ifndef HAVE_TIMEGM
741#include <time.h>
742time_t timegm (struct tm *tm);
743#endif /* !TIMEGM */
744#ifndef HAVE_GMTIME_R
745struct tm *gmtime_r(const time_t *timep, struct tm *result);
746#endif
747#ifndef HAVE_ASCTIME_R
748char *asctime_r(const struct tm *tm, char *buf);
749#endif
750#ifndef HAVE_LOCALTIME_R
751struct tm *localtime_r(const time_t *timep, struct tm *result);
752#endif
753#ifndef HAVE_ISBLANK
754int isblank(int c);
755#endif /* !HAVE_ISBLANK */
756#ifndef HAVE_ISASCII
757int isascii(int c);
758#endif /* !HAVE_ISASCII */
759#ifndef HAVE_SNPRINTF
760#include <stdarg.h>
761int snprintf (char *str, size_t count, const char *fmt, ...);
762int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
763#endif /* HAVE_SNPRINTF */
764#if !defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
765int inet_pton(int af, const char* src, void* dst);
766#endif /* HAVE_INET_PTON */
767#if !defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
768const char *inet_ntop(int af, const void *src, char *dst, size_t size);
769#endif
770#ifndef HAVE_INET_ATON
771int inet_aton(const char *cp, struct in_addr *addr);
772#endif
773#ifndef HAVE_MEMMOVE
774void *memmove(void *dest, const void *src, size_t n);
775#endif
776#ifndef HAVE_STRLCPY
777size_t strlcpy(char *dst, const char *src, size_t siz);
778#endif
779
780#ifdef USE_WINSOCK
781#define SOCK_INVALID ((INT_PTR)INVALID_SOCKET)
782#define close_socket(_s) do { if (_s != SOCK_INVALID) {closesocket(_s); _s = -1;} } while(0)
783#else
784#define SOCK_INVALID -1
785#define close_socket(_s) do { if (_s != SOCK_INVALID) {close(_s >= -1 ? _s : -1); _s = -1;} } while(0)
786#endif
787
788#ifdef __cplusplus
789}
790#endif
791#ifndef HAVE_GETADDRINFO
792#include "compat/fake-rfc2553.h"
793#endif
794#ifndef HAVE_STRTOUL
795#define strtoul (unsigned long)strtol
796#endif
797
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.