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