ldns  1.9.0
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 1
51
52/* Is a CAPATH given at configure time */
53#define HAVE_DANE_CA_PATH 1
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#define HAVE_LIBPCAP 1
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#define HAVE_NETINET_IF_ETHER_H 1
208
209/* Define to 1 if you have the <netinet/igmp.h> header file. */
210#define HAVE_NETINET_IGMP_H 1
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#define HAVE_NETINET_IN_SYSTM_H 1
217
218/* Define to 1 if you have the <netinet/ip6.h> header file. */
219#define HAVE_NETINET_IP6_H 1
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#define HAVE_NETINET_IP_H 1
226
227/* Define to 1 if you have the <netinet/udp.h> header file. */
228#define HAVE_NETINET_UDP_H 1
229
230/* Define to 1 if you have the <net/ethernet.h> header file. */
231#define HAVE_NET_ETHERNET_H 1
232
233/* Define to 1 if you have the <net/if.h> header file. */
234#define HAVE_NET_IF_H 1
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/* #undef HAVE_OPENSSL_ENGINE_H */
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#define HAVE_PCAP_H 1
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#define HAVE_PYTHON "3.15"
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#define HAVE_SWIG 1
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#define LDNS_DANE_CA_FILE "/etc/pki/tls/certs/ca-bundle.trust.crt"
367
368/* Is a CAPATH given at configure time */
369#define LDNS_DANE_CA_PATH "/etc/pki/tls/certs/"
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 4
430
431/* Define to 1 if all of the C89 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#define USE_DANE_TA_USAGE 1
447
448/* Define this to enable DANE verify support. */
449#define USE_DANE_VERIFY 1
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/* #undef USE_GOST */
465
466/* Define this to enable SHA256 and SHA512 support. */
467#define USE_SHA2 1
468
469/* Enable extensions on AIX, Interix, z/OS. */
470#ifndef _ALL_SOURCE
471# define _ALL_SOURCE 1
472#endif
473/* Enable extensions on Cosmopolitan Libc. */
474#ifndef _COSMO_SOURCE
475# define _COSMO_SOURCE 1
476#endif
477/* Enable general extensions on macOS. */
478#ifndef _DARWIN_C_SOURCE
479# define _DARWIN_C_SOURCE 1
480#endif
481/* Enable general extensions on Solaris. */
482#ifndef __EXTENSIONS__
483# define __EXTENSIONS__ 1
484#endif
485/* Enable GNU extensions on systems that have them. */
486#ifndef _GNU_SOURCE
487# define _GNU_SOURCE 1
488#endif
489/* Enable X/Open compliant socket functions that do not require linking
490 with -lxnet on HP-UX 11.11. */
491#ifndef _HPUX_ALT_XOPEN_SOCKET_API
492# define _HPUX_ALT_XOPEN_SOCKET_API 1
493#endif
494/* Identify the host operating system as Minix.
495 This macro does not affect the system headers' behavior.
496 A future release of Autoconf may stop defining this macro. */
497#ifndef _MINIX
498/* # undef _MINIX */
499#endif
500/* Enable general extensions on NetBSD.
501 Enable NetBSD compatibility extensions on Minix. */
502#ifndef _NETBSD_SOURCE
503# define _NETBSD_SOURCE 1
504#endif
505/* Enable OpenBSD compatibility extensions on NetBSD.
506 Oddly enough, this does nothing on OpenBSD. */
507#ifndef _OPENBSD_SOURCE
508# define _OPENBSD_SOURCE 1
509#endif
510/* Define to 1 if needed for POSIX-compatible behavior. */
511#ifndef _POSIX_SOURCE
512/* # undef _POSIX_SOURCE */
513#endif
514/* Define to 2 if needed for POSIX-compatible behavior. */
515#ifndef _POSIX_1_SOURCE
516/* # undef _POSIX_1_SOURCE */
517#endif
518/* Enable POSIX-compatible threading on Solaris. */
519#ifndef _POSIX_PTHREAD_SEMANTICS
520# define _POSIX_PTHREAD_SEMANTICS 1
521#endif
522/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
523#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
524# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
525#endif
526/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
527#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
528# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
529#endif
530/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
531#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
532# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
533#endif
534/* Enable extensions specified by C23 Annex F. */
535#ifndef __STDC_WANT_IEC_60559_EXT__
536# define __STDC_WANT_IEC_60559_EXT__ 1
537#endif
538/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
539#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
540# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
541#endif
542/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
543#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
544# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
545#endif
546/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
547#ifndef __STDC_WANT_LIB_EXT2__
548# define __STDC_WANT_LIB_EXT2__ 1
549#endif
550/* Enable extensions specified by ISO/IEC 24747:2009. */
551#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
552# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
553#endif
554/* Enable extensions on HP NonStop. */
555#ifndef _TANDEM_SOURCE
556# define _TANDEM_SOURCE 1
557#endif
558/* Enable X/Open extensions. Define to 500 only if necessary
559 to make mbstate_t available. */
560#ifndef _XOPEN_SOURCE
561/* # undef _XOPEN_SOURCE */
562#endif
563
564
565/* Whether the windows socket API is used */
566/* #undef USE_WINSOCK */
567
568/* the version of the windows API enabled */
569#define WINVER 0x0502
570
571/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
572 significant byte first (like Motorola and SPARC, unlike Intel). */
573#if defined AC_APPLE_UNIVERSAL_BUILD
574# if defined __BIG_ENDIAN__
575# define WORDS_BIGENDIAN 1
576# endif
577#else
578# ifndef WORDS_BIGENDIAN
579/* # undef WORDS_BIGENDIAN */
580# endif
581#endif
582
583/* Enable for compile on Minix */
584#define _NETBSD_SOURCE 1
585
586/* Define to empty if 'const' does not conform to ANSI C. */
587/* #undef const */
588
589/* in_addr_t */
590/* #undef in_addr_t */
591
592/* in_port_t */
593/* #undef in_port_t */
594
595/* Define to '__inline__' or '__inline' if that's what the C compiler
596 calls it, or to nothing if 'inline' is not supported under any name. */
597#ifndef __cplusplus
598/* #undef inline */
599#endif
600
601/* Define to 'short' if <sys/types.h> does not define. */
602/* #undef int16_t */
603
604/* Define to 'int' if <sys/types.h> does not define. */
605/* #undef int32_t */
606
607/* Define to 'long long' if <sys/types.h> does not define. */
608/* #undef int64_t */
609
610/* Define to 'char' if <sys/types.h> does not define. */
611/* #undef int8_t */
612
613/* Define to 'size_t' if <sys/types.h> does not define. */
614/* #undef intptr_t */
615
616/* Define as a signed integer type capable of holding a process identifier. */
617/* #undef pid_t */
618
619/* Define as 'unsigned int' if <stddef.h> doesn't define. */
620/* #undef size_t */
621
622/* Define to 'int' if not defined */
623/* #undef socklen_t */
624
625/* Fallback member name for socket family in struct sockaddr_storage */
626/* #undef ss_family */
627
628/* Define to 'int' if <sys/types.h> does not define. */
629/* #undef ssize_t */
630
631/* Define to 'unsigned short' if <sys/types.h> does not define. */
632/* #undef uint16_t */
633
634/* Define to 'unsigned int' if <sys/types.h> does not define. */
635/* #undef uint32_t */
636
637/* Define to 'unsigned long long' if <sys/types.h> does not define. */
638/* #undef uint64_t */
639
640/* Define to 'unsigned char' if <sys/types.h> does not define. */
641/* #undef uint8_t */
642
643/* Define as 'fork' if 'vfork' does not work. */
644/* #undef vfork */
645
646
647#include <stdio.h>
648#include <string.h>
649#include <unistd.h>
650#include <assert.h>
651
652#ifndef LITTLE_ENDIAN
653#define LITTLE_ENDIAN 1234
654#endif
655
656#ifndef BIG_ENDIAN
657#define BIG_ENDIAN 4321
658#endif
659
660#ifndef BYTE_ORDER
661#ifdef WORDS_BIGENDIAN
662#define BYTE_ORDER BIG_ENDIAN
663#else
664#define BYTE_ORDER LITTLE_ENDIAN
665#endif /* WORDS_BIGENDIAN */
666#endif /* BYTE_ORDER */
667
668#if STDC_HEADERS
669#include <stdlib.h>
670#include <stddef.h>
671#endif
672
673#ifdef HAVE_STDINT_H
674#include <stdint.h>
675#endif
676
677#ifdef HAVE_SYS_SOCKET_H
678#include <sys/socket.h>
679#endif
680
681#ifdef HAVE_NETINET_IN_H
682#include <netinet/in.h>
683#endif
684
685#ifdef HAVE_ARPA_INET_H
686#include <arpa/inet.h>
687#endif
688
689#ifdef HAVE_WINSOCK2_H
690#include <winsock2.h>
691#endif
692
693#ifdef HAVE_WS2TCPIP_H
694#include <ws2tcpip.h>
695#endif
696
697
698/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
699#ifdef HAVE_WINSOCK2_H
700#define FD_SET_T (u_int)
701#else
702#define FD_SET_T
703#endif
704
705
706
707
708#ifdef __cplusplus
709extern "C" {
710#endif
711
712int ldns_b64_ntop(uint8_t const *src, size_t srclength,
713 char *target, size_t targsize);
717/*@unused@*/
718static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
719{
720 return ((((srcsize + 2) / 3) * 4) + 1);
721}
722int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
726/*@unused@*/
727static inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
728{
729 return (((((srcsize + 3) / 4) * 3)) + 1);
730}
731
736int ldns_dname_compare_v(const void *a, const void *b);
737
738#ifndef HAVE_SLEEP
739/* use windows sleep, in millisecs, instead */
740#define sleep(x) Sleep((x)*1000)
741#endif
742
743#ifndef HAVE_RANDOM
744#define srandom(x) srand(x)
745#define random(x) rand(x)
746#endif
747
748#ifndef HAVE_TIMEGM
749#include <time.h>
750time_t timegm (struct tm *tm);
751#endif /* !TIMEGM */
752#ifndef HAVE_GMTIME_R
753struct tm *gmtime_r(const time_t *timep, struct tm *result);
754#endif
755#ifndef HAVE_ASCTIME_R
756char *asctime_r(const struct tm *tm, char *buf);
757#endif
758#ifndef HAVE_LOCALTIME_R
759struct tm *localtime_r(const time_t *timep, struct tm *result);
760#endif
761#ifndef HAVE_ISBLANK
762int isblank(int c);
763#endif /* !HAVE_ISBLANK */
764#ifndef HAVE_ISASCII
765int isascii(int c);
766#endif /* !HAVE_ISASCII */
767#ifndef HAVE_SNPRINTF
768#include <stdarg.h>
769int snprintf (char *str, size_t count, const char *fmt, ...);
770int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
771#endif /* HAVE_SNPRINTF */
772#if !defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
773int inet_pton(int af, const char* src, void* dst);
774#endif /* HAVE_INET_PTON */
775#if !defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
776const char *inet_ntop(int af, const void *src, char *dst, size_t size);
777#endif
778#ifndef HAVE_INET_ATON
779int inet_aton(const char *cp, struct in_addr *addr);
780#endif
781#ifndef HAVE_MEMMOVE
782void *memmove(void *dest, const void *src, size_t n);
783#endif
784#ifndef HAVE_STRLCPY
785size_t strlcpy(char *dst, const char *src, size_t siz);
786#endif
787
788#ifdef USE_WINSOCK
789#define SOCK_INVALID ((INT_PTR)INVALID_SOCKET)
790#define close_socket(_s) do { if (_s != SOCK_INVALID) {closesocket(_s); _s = -1;} } while(0)
791#else
792#define SOCK_INVALID -1
793#define close_socket(_s) do { if (_s != SOCK_INVALID) {close(_s >= -1 ? _s : -1); _s = -1;} } while(0)
794#endif
795
796#ifdef __cplusplus
797}
798#endif
799#ifndef HAVE_GETADDRINFO
800#include "compat/fake-rfc2553.h"
801#endif
802#ifndef HAVE_STRTOUL
803#define strtoul (unsigned long)strtol
804#endif
805
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.