ldns  1.8.4
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.13"
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.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 C89 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#define USE_DANE_TA_USAGE 1
438
439/* Define this to enable DANE verify support. */
440#define USE_DANE_VERIFY 1
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/* #undef USE_GOST */
456
457/* Define this to enable SHA256 and SHA512 support. */
458#define USE_SHA2 1
459
460/* Enable extensions on AIX, Interix, z/OS. */
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 C23 Annex F. */
522#ifndef __STDC_WANT_IEC_60559_EXT__
523# define __STDC_WANT_IEC_60559_EXT__ 1
524#endif
525/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
526#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
527# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
528#endif
529/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
530#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
531# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
532#endif
533/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
534#ifndef __STDC_WANT_LIB_EXT2__
535# define __STDC_WANT_LIB_EXT2__ 1
536#endif
537/* Enable extensions specified by ISO/IEC 24747:2009. */
538#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
539# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
540#endif
541/* Enable extensions on HP NonStop. */
542#ifndef _TANDEM_SOURCE
543# define _TANDEM_SOURCE 1
544#endif
545/* Enable X/Open extensions. Define to 500 only if necessary
546 to make mbstate_t available. */
547#ifndef _XOPEN_SOURCE
548/* # undef _XOPEN_SOURCE */
549#endif
550
551
552/* Whether the windows socket API is used */
553/* #undef USE_WINSOCK */
554
555/* the version of the windows API enabled */
556#define WINVER 0x0502
557
558/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
559 significant byte first (like Motorola and SPARC, unlike Intel). */
560#if defined AC_APPLE_UNIVERSAL_BUILD
561# if defined __BIG_ENDIAN__
562# define WORDS_BIGENDIAN 1
563# endif
564#else
565# ifndef WORDS_BIGENDIAN
566/* # undef WORDS_BIGENDIAN */
567# endif
568#endif
569
570/* Enable for compile on Minix */
571#define _NETBSD_SOURCE 1
572
573/* Define to empty if 'const' does not conform to ANSI C. */
574/* #undef const */
575
576/* in_addr_t */
577/* #undef in_addr_t */
578
579/* in_port_t */
580/* #undef in_port_t */
581
582/* Define to '__inline__' or '__inline' if that's what the C compiler
583 calls it, or to nothing if 'inline' is not supported under any name. */
584#ifndef __cplusplus
585/* #undef inline */
586#endif
587
588/* Define to 'short' if <sys/types.h> does not define. */
589/* #undef int16_t */
590
591/* Define to 'int' if <sys/types.h> does not define. */
592/* #undef int32_t */
593
594/* Define to 'long long' if <sys/types.h> does not define. */
595/* #undef int64_t */
596
597/* Define to 'char' if <sys/types.h> does not define. */
598/* #undef int8_t */
599
600/* Define to 'size_t' if <sys/types.h> does not define. */
601/* #undef intptr_t */
602
603/* Define as a signed integer type capable of holding a process identifier. */
604/* #undef pid_t */
605
606/* Define as 'unsigned int' if <stddef.h> doesn't define. */
607/* #undef size_t */
608
609/* Define to 'int' if not defined */
610/* #undef socklen_t */
611
612/* Fallback member name for socket family in struct sockaddr_storage */
613/* #undef ss_family */
614
615/* Define to 'int' if <sys/types.h> does not define. */
616/* #undef ssize_t */
617
618/* Define to 'unsigned short' if <sys/types.h> does not define. */
619/* #undef uint16_t */
620
621/* Define to 'unsigned int' if <sys/types.h> does not define. */
622/* #undef uint32_t */
623
624/* Define to 'unsigned long long' if <sys/types.h> does not define. */
625/* #undef uint64_t */
626
627/* Define to 'unsigned char' if <sys/types.h> does not define. */
628/* #undef uint8_t */
629
630/* Define as 'fork' if 'vfork' does not work. */
631/* #undef vfork */
632
633
634#include <stdio.h>
635#include <string.h>
636#include <unistd.h>
637#include <assert.h>
638
639#ifndef LITTLE_ENDIAN
640#define LITTLE_ENDIAN 1234
641#endif
642
643#ifndef BIG_ENDIAN
644#define BIG_ENDIAN 4321
645#endif
646
647#ifndef BYTE_ORDER
648#ifdef WORDS_BIGENDIAN
649#define BYTE_ORDER BIG_ENDIAN
650#else
651#define BYTE_ORDER LITTLE_ENDIAN
652#endif /* WORDS_BIGENDIAN */
653#endif /* BYTE_ORDER */
654
655#if STDC_HEADERS
656#include <stdlib.h>
657#include <stddef.h>
658#endif
659
660#ifdef HAVE_STDINT_H
661#include <stdint.h>
662#endif
663
664#ifdef HAVE_SYS_SOCKET_H
665#include <sys/socket.h>
666#endif
667
668#ifdef HAVE_NETINET_IN_H
669#include <netinet/in.h>
670#endif
671
672#ifdef HAVE_ARPA_INET_H
673#include <arpa/inet.h>
674#endif
675
676#ifdef HAVE_WINSOCK2_H
677#include <winsock2.h>
678#endif
679
680#ifdef HAVE_WS2TCPIP_H
681#include <ws2tcpip.h>
682#endif
683
684
685/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
686#ifdef HAVE_WINSOCK2_H
687#define FD_SET_T (u_int)
688#else
689#define FD_SET_T
690#endif
691
692
693
694
695#ifdef __cplusplus
696extern "C" {
697#endif
698
699int ldns_b64_ntop(uint8_t const *src, size_t srclength,
700 char *target, size_t targsize);
704/*@unused@*/
705static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
706{
707 return ((((srcsize + 2) / 3) * 4) + 1);
708}
709int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
713/*@unused@*/
714static inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
715{
716 return (((((srcsize + 3) / 4) * 3)) + 1);
717}
718
723int ldns_dname_compare_v(const void *a, const void *b);
724
725#ifndef HAVE_SLEEP
726/* use windows sleep, in millisecs, instead */
727#define sleep(x) Sleep((x)*1000)
728#endif
729
730#ifndef HAVE_RANDOM
731#define srandom(x) srand(x)
732#define random(x) rand(x)
733#endif
734
735#ifndef HAVE_TIMEGM
736#include <time.h>
737time_t timegm (struct tm *tm);
738#endif /* !TIMEGM */
739#ifndef HAVE_GMTIME_R
740struct tm *gmtime_r(const time_t *timep, struct tm *result);
741#endif
742#ifndef HAVE_ASCTIME_R
743char *asctime_r(const struct tm *tm, char *buf);
744#endif
745#ifndef HAVE_LOCALTIME_R
746struct tm *localtime_r(const time_t *timep, struct tm *result);
747#endif
748#ifndef HAVE_ISBLANK
749int isblank(int c);
750#endif /* !HAVE_ISBLANK */
751#ifndef HAVE_ISASCII
752int isascii(int c);
753#endif /* !HAVE_ISASCII */
754#ifndef HAVE_SNPRINTF
755#include <stdarg.h>
756int snprintf (char *str, size_t count, const char *fmt, ...);
757int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
758#endif /* HAVE_SNPRINTF */
759#if !defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
760int inet_pton(int af, const char* src, void* dst);
761#endif /* HAVE_INET_PTON */
762#if !defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
763const char *inet_ntop(int af, const void *src, char *dst, size_t size);
764#endif
765#ifndef HAVE_INET_ATON
766int inet_aton(const char *cp, struct in_addr *addr);
767#endif
768#ifndef HAVE_MEMMOVE
769void *memmove(void *dest, const void *src, size_t n);
770#endif
771#ifndef HAVE_STRLCPY
772size_t strlcpy(char *dst, const char *src, size_t siz);
773#endif
774
775#ifdef USE_WINSOCK
776#define SOCK_INVALID ((INT_PTR)INVALID_SOCKET)
777#define close_socket(_s) do { if (_s != SOCK_INVALID) {closesocket(_s); _s = -1;} } while(0)
778#else
779#define SOCK_INVALID -1
780#define close_socket(_s) do { if (_s != SOCK_INVALID) {close(_s); _s = -1;} } while(0)
781#endif
782
783#ifdef __cplusplus
784}
785#endif
786#ifndef HAVE_GETADDRINFO
787#include "compat/fake-rfc2553.h"
788#endif
789#ifndef HAVE_STRTOUL
790#define strtoul (unsigned long)strtol
791#endif
792
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.