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