config.h.in revision 249141
1/* config.h.in.  Generated from configure.ac by autoheader.  */
2
3/* Directory to chroot to */
4#undef CHROOT_DIR
5
6/* Pathname to the Unbound configuration file */
7#undef CONFIGFILE
8
9/* configure flags */
10#undef CONFIGURE_BUILD_WITH
11
12/* configure date */
13#undef CONFIGURE_DATE
14
15/* configure target system */
16#undef CONFIGURE_TARGET
17
18/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
19   */
20#undef DARWIN_BROKEN_SETREUID
21
22/* Whether daemon is deprecated */
23#undef DEPRECATED_DAEMON
24
25/* Define if you want to use debug lock checking (slow). */
26#undef ENABLE_LOCK_CHECKS
27
28/* Define this if you enabled-allsymbols from libunbound to link binaries to
29   it for smaller install size, but the libunbound export table is polluted by
30   internal symbols */
31#undef EXPORT_ALL_SYMBOLS
32
33/* Define to 1 if you have the <arpa/inet.h> header file. */
34#undef HAVE_ARPA_INET_H
35
36/* Whether the C compiler accepts the "format" attribute */
37#undef HAVE_ATTR_FORMAT
38
39/* Whether the C compiler accepts the "unused" attribute */
40#undef HAVE_ATTR_UNUSED
41
42/* Define to 1 if your system has a working `chown' function. */
43#undef HAVE_CHOWN
44
45/* Define to 1 if you have the `chroot' function. */
46#undef HAVE_CHROOT
47
48/* Define to 1 if you have the `ctime_r' function. */
49#undef HAVE_CTIME_R
50
51/* Define to 1 if you have the `daemon' function. */
52#undef HAVE_DAEMON
53
54/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
55   don't. */
56#undef HAVE_DECL_NID_SECP384R1
57
58/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
59   if you don't. */
60#undef HAVE_DECL_NID_X9_62_PRIME256V1
61
62/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
63   if you don't. */
64#undef HAVE_DECL_SK_SSL_COMP_POP_FREE
65
66/* Define to 1 if you have the declaration of
67   `SSL_COMP_get_compression_methods', and to 0 if you don't. */
68#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
69
70/* Define to 1 if you have the <dlfcn.h> header file. */
71#undef HAVE_DLFCN_H
72
73/* Define to 1 if you have the `event_base_free' function. */
74#undef HAVE_EVENT_BASE_FREE
75
76/* Define to 1 if you have the `event_base_get_method' function. */
77#undef HAVE_EVENT_BASE_GET_METHOD
78
79/* Define to 1 if you have the `event_base_new' function. */
80#undef HAVE_EVENT_BASE_NEW
81
82/* Define to 1 if you have the `event_base_once' function. */
83#undef HAVE_EVENT_BASE_ONCE
84
85/* Define to 1 if you have the <event.h> header file. */
86#undef HAVE_EVENT_H
87
88/* Define to 1 if you have the `EVP_sha1' function. */
89#undef HAVE_EVP_SHA1
90
91/* Define to 1 if you have the `EVP_sha256' function. */
92#undef HAVE_EVP_SHA256
93
94/* Define to 1 if you have the `EVP_sha512' function. */
95#undef HAVE_EVP_SHA512
96
97/* Define to 1 if you have the `ev_default_loop' function. */
98#undef HAVE_EV_DEFAULT_LOOP
99
100/* Define to 1 if you have the `ev_loop' function. */
101#undef HAVE_EV_LOOP
102
103/* Define to 1 if you have the <expat.h> header file. */
104#undef HAVE_EXPAT_H
105
106/* Define to 1 if you have the `fcntl' function. */
107#undef HAVE_FCNTL
108
109/* Define to 1 if you have the `FIPS_mode' function. */
110#undef HAVE_FIPS_MODE
111
112/* Define to 1 if you have the `fork' function. */
113#undef HAVE_FORK
114
115/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
116#undef HAVE_FSEEKO
117
118/* Whether getaddrinfo is available */
119#undef HAVE_GETADDRINFO
120
121/* Define to 1 if you have the <getopt.h> header file. */
122#undef HAVE_GETOPT_H
123
124/* Define to 1 if you have the `getpwnam' function. */
125#undef HAVE_GETPWNAM
126
127/* Define to 1 if you have the `getrlimit' function. */
128#undef HAVE_GETRLIMIT
129
130/* Define to 1 if you have the `glob' function. */
131#undef HAVE_GLOB
132
133/* Define to 1 if you have the <glob.h> header file. */
134#undef HAVE_GLOB_H
135
136/* Define to 1 if you have the `gmtime_r' function. */
137#undef HAVE_GMTIME_R
138
139/* Define to 1 if you have the <grp.h> header file. */
140#undef HAVE_GRP_H
141
142/* If you have HMAC_CTX_init */
143#undef HAVE_HMAC_CTX_INIT
144
145/* Define to 1 if you have the `inet_aton' function. */
146#undef HAVE_INET_ATON
147
148/* Define to 1 if you have the `inet_ntop' function. */
149#undef HAVE_INET_NTOP
150
151/* Define to 1 if you have the `inet_pton' function. */
152#undef HAVE_INET_PTON
153
154/* Define to 1 if you have the `initgroups' function. */
155#undef HAVE_INITGROUPS
156
157/* Define to 1 if you have the <inttypes.h> header file. */
158#undef HAVE_INTTYPES_H
159
160/* if the function 'ioctlsocket' is available */
161#undef HAVE_IOCTLSOCKET
162
163/* Define to 1 if you have the <iphlpapi.h> header file. */
164#undef HAVE_IPHLPAPI_H
165
166/* Define to 1 if you have the `kill' function. */
167#undef HAVE_KILL
168
169/* Define to 1 if you have the `ldns_key_EVP_unload_gost' function. */
170#undef HAVE_LDNS_KEY_EVP_UNLOAD_GOST
171
172/* Define to 1 if you have the <ldns/ldns.h> header file. */
173#undef HAVE_LDNS_LDNS_H
174
175/* Define to 1 if you have the `ldns' library (-lldns). */
176#undef HAVE_LIBLDNS
177
178/* Define to 1 if you have the `localtime_r' function. */
179#undef HAVE_LOCALTIME_R
180
181/* Define to 1 if you have the <login_cap.h> header file. */
182#undef HAVE_LOGIN_CAP_H
183
184/* If have GNU libc compatible malloc */
185#undef HAVE_MALLOC
186
187/* Define to 1 if you have the `memmove' function. */
188#undef HAVE_MEMMOVE
189
190/* Define to 1 if you have the <memory.h> header file. */
191#undef HAVE_MEMORY_H
192
193/* Define to 1 if you have the <netdb.h> header file. */
194#undef HAVE_NETDB_H
195
196/* Define to 1 if you have the <netinet/in.h> header file. */
197#undef HAVE_NETINET_IN_H
198
199/* Use libnss for crypto */
200#undef HAVE_NSS
201
202/* Define to 1 if you have the `OPENSSL_config' function. */
203#undef HAVE_OPENSSL_CONFIG
204
205/* Define to 1 if you have the <openssl/conf.h> header file. */
206#undef HAVE_OPENSSL_CONF_H
207
208/* Define to 1 if you have the <openssl/engine.h> header file. */
209#undef HAVE_OPENSSL_ENGINE_H
210
211/* Define to 1 if you have the <openssl/err.h> header file. */
212#undef HAVE_OPENSSL_ERR_H
213
214/* Define to 1 if you have the <openssl/rand.h> header file. */
215#undef HAVE_OPENSSL_RAND_H
216
217/* Define to 1 if you have the <openssl/ssl.h> header file. */
218#undef HAVE_OPENSSL_SSL_H
219
220/* Define if you have POSIX threads libraries and header files. */
221#undef HAVE_PTHREAD
222
223/* Define to 1 if the system has the type `pthread_rwlock_t'. */
224#undef HAVE_PTHREAD_RWLOCK_T
225
226/* Define to 1 if the system has the type `pthread_spinlock_t'. */
227#undef HAVE_PTHREAD_SPINLOCK_T
228
229/* Define to 1 if you have the <pwd.h> header file. */
230#undef HAVE_PWD_H
231
232/* Define if you have Python libraries and header files. */
233#undef HAVE_PYTHON
234
235/* Define to 1 if you have the `random' function. */
236#undef HAVE_RANDOM
237
238/* Define to 1 if you have the `recvmsg' function. */
239#undef HAVE_RECVMSG
240
241/* Define to 1 if you have the `sbrk' function. */
242#undef HAVE_SBRK
243
244/* Define to 1 if you have the `sendmsg' function. */
245#undef HAVE_SENDMSG
246
247/* Define to 1 if you have the `setregid' function. */
248#undef HAVE_SETREGID
249
250/* Define to 1 if you have the `setresgid' function. */
251#undef HAVE_SETRESGID
252
253/* Define to 1 if you have the `setresuid' function. */
254#undef HAVE_SETRESUID
255
256/* Define to 1 if you have the `setreuid' function. */
257#undef HAVE_SETREUID
258
259/* Define to 1 if you have the `setrlimit' function. */
260#undef HAVE_SETRLIMIT
261
262/* Define to 1 if you have the `setsid' function. */
263#undef HAVE_SETSID
264
265/* Define to 1 if you have the `setusercontext' function. */
266#undef HAVE_SETUSERCONTEXT
267
268/* Define to 1 if you have the `sigprocmask' function. */
269#undef HAVE_SIGPROCMASK
270
271/* Define to 1 if you have the `sleep' function. */
272#undef HAVE_SLEEP
273
274/* Define to 1 if you have the `snprintf' function. */
275#undef HAVE_SNPRINTF
276
277/* Define to 1 if you have the `socketpair' function. */
278#undef HAVE_SOCKETPAIR
279
280/* Using Solaris threads */
281#undef HAVE_SOLARIS_THREADS
282
283/* Define to 1 if you have the `srandom' function. */
284#undef HAVE_SRANDOM
285
286/* Define if you have the SSL libraries installed. */
287#undef HAVE_SSL
288
289/* Define to 1 if you have the <stdarg.h> header file. */
290#undef HAVE_STDARG_H
291
292/* Define to 1 if you have the <stdbool.h> header file. */
293#undef HAVE_STDBOOL_H
294
295/* Define to 1 if you have the <stdint.h> header file. */
296#undef HAVE_STDINT_H
297
298/* Define to 1 if you have the <stdlib.h> header file. */
299#undef HAVE_STDLIB_H
300
301/* Define to 1 if you have the `strftime' function. */
302#undef HAVE_STRFTIME
303
304/* Define to 1 if you have the <strings.h> header file. */
305#undef HAVE_STRINGS_H
306
307/* Define to 1 if you have the <string.h> header file. */
308#undef HAVE_STRING_H
309
310/* Define to 1 if you have the `strlcpy' function. */
311#undef HAVE_STRLCPY
312
313/* Define to 1 if you have the `strptime' function. */
314#undef HAVE_STRPTIME
315
316/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
317#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
318
319/* Define if you have Swig libraries and header files. */
320#undef HAVE_SWIG
321
322/* Define to 1 if you have the <syslog.h> header file. */
323#undef HAVE_SYSLOG_H
324
325/* Define to 1 if you have the <sys/param.h> header file. */
326#undef HAVE_SYS_PARAM_H
327
328/* Define to 1 if you have the <sys/resource.h> header file. */
329#undef HAVE_SYS_RESOURCE_H
330
331/* Define to 1 if you have the <sys/socket.h> header file. */
332#undef HAVE_SYS_SOCKET_H
333
334/* Define to 1 if you have the <sys/stat.h> header file. */
335#undef HAVE_SYS_STAT_H
336
337/* Define to 1 if you have the <sys/types.h> header file. */
338#undef HAVE_SYS_TYPES_H
339
340/* Define to 1 if you have the <sys/uio.h> header file. */
341#undef HAVE_SYS_UIO_H
342
343/* Define to 1 if you have the <sys/wait.h> header file. */
344#undef HAVE_SYS_WAIT_H
345
346/* Define to 1 if you have the <time.h> header file. */
347#undef HAVE_TIME_H
348
349/* Define to 1 if you have the `tzset' function. */
350#undef HAVE_TZSET
351
352/* Define to 1 if you have the <unistd.h> header file. */
353#undef HAVE_UNISTD_H
354
355/* Define to 1 if you have the `usleep' function. */
356#undef HAVE_USLEEP
357
358/* Define to 1 if you have the `vfork' function. */
359#undef HAVE_VFORK
360
361/* Define to 1 if you have the <vfork.h> header file. */
362#undef HAVE_VFORK_H
363
364/* Define to 1 if you have the <windows.h> header file. */
365#undef HAVE_WINDOWS_H
366
367/* Using Windows threads */
368#undef HAVE_WINDOWS_THREADS
369
370/* Define to 1 if you have the <winsock2.h> header file. */
371#undef HAVE_WINSOCK2_H
372
373/* Define to 1 if `fork' works. */
374#undef HAVE_WORKING_FORK
375
376/* Define to 1 if `vfork' works. */
377#undef HAVE_WORKING_VFORK
378
379/* Define to 1 if you have the `writev' function. */
380#undef HAVE_WRITEV
381
382/* Define to 1 if you have the <ws2tcpip.h> header file. */
383#undef HAVE_WS2TCPIP_H
384
385/* Define to 1 if you have the `_beginthreadex' function. */
386#undef HAVE__BEGINTHREADEX
387
388/* if lex has yylex_destroy */
389#undef LEX_HAS_YYLEX_DESTROY
390
391/* Define to the sub-directory in which libtool stores uninstalled libraries.
392   */
393#undef LT_OBJDIR
394
395/* Define to the maximum message length to pass to syslog. */
396#undef MAXSYSLOGMSGLEN
397
398/* Define if memcmp() does not compare unsigned bytes */
399#undef MEMCMP_IS_BROKEN
400
401/* Define if mkdir has one argument. */
402#undef MKDIR_HAS_ONE_ARG
403
404/* Define if the network stack does not fully support nonblocking io (causes
405   lower performance). */
406#undef NONBLOCKING_IS_BROKEN
407
408/* Put -D_ALL_SOURCE define in config.h */
409#undef OMITTED__D_ALL_SOURCE
410
411/* Put -D_BSD_SOURCE define in config.h */
412#undef OMITTED__D_BSD_SOURCE
413
414/* Put -D_GNU_SOURCE define in config.h */
415#undef OMITTED__D_GNU_SOURCE
416
417/* Put -D_LARGEFILE_SOURCE=1 define in config.h */
418#undef OMITTED__D_LARGEFILE_SOURCE_1
419
420/* Put -D_POSIX_C_SOURCE=200112 define in config.h */
421#undef OMITTED__D_POSIX_C_SOURCE_200112
422
423/* Put -D_XOPEN_SOURCE=600 define in config.h */
424#undef OMITTED__D_XOPEN_SOURCE_600
425
426/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
427#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1
428
429/* Put -D__EXTENSIONS__ define in config.h */
430#undef OMITTED__D__EXTENSIONS__
431
432/* Define to the address where bug reports for this package should be sent. */
433#undef PACKAGE_BUGREPORT
434
435/* Define to the full name of this package. */
436#undef PACKAGE_NAME
437
438/* Define to the full name and version of this package. */
439#undef PACKAGE_STRING
440
441/* Define to the one symbol short name of this package. */
442#undef PACKAGE_TARNAME
443
444/* Define to the home page for this package. */
445#undef PACKAGE_URL
446
447/* Define to the version of this package. */
448#undef PACKAGE_VERSION
449
450/* default pidfile location */
451#undef PIDFILE
452
453/* Define to necessary symbol if this constant uses a non-standard name on
454   your system. */
455#undef PTHREAD_CREATE_JOINABLE
456
457/* Define as the return type of signal handlers (`int' or `void'). */
458#undef RETSIGTYPE
459
460/* default rootkey location */
461#undef ROOT_ANCHOR_FILE
462
463/* default rootcert location */
464#undef ROOT_CERT_FILE
465
466/* version number for resource files */
467#undef RSRC_PACKAGE_VERSION
468
469/* Directory to chdir to */
470#undef RUN_DIR
471
472/* Shared data */
473#undef SHARE_DIR
474
475/* Define to 1 if you have the ANSI C header files. */
476#undef STDC_HEADERS
477
478/* use default strptime. */
479#undef STRPTIME_WORKS
480
481/* Use win32 resources and API */
482#undef UB_ON_WINDOWS
483
484/* default username */
485#undef UB_USERNAME
486
487/* use to enable lightweight alloc assertions, for debug use */
488#undef UNBOUND_ALLOC_LITE
489
490/* use malloc not regions, for debug use */
491#undef UNBOUND_ALLOC_NONREGIONAL
492
493/* use statistics for allocs and frees, for debug use */
494#undef UNBOUND_ALLOC_STATS
495
496/* define this to enable debug checks. */
497#undef UNBOUND_DEBUG
498
499/* Define this to enable ECDSA support. */
500#undef USE_ECDSA
501
502/* Define this to enable an EVP workaround for older openssl */
503#undef USE_ECDSA_EVP_WORKAROUND
504
505/* Define this to enable GOST support. */
506#undef USE_GOST
507
508/* Define if you want to use internal select based events */
509#undef USE_MINI_EVENT
510
511/* Define this to enable SHA256 and SHA512 support. */
512#undef USE_SHA2
513
514/* Enable extensions on AIX 3, Interix.  */
515#ifndef _ALL_SOURCE
516# undef _ALL_SOURCE
517#endif
518/* Enable GNU extensions on systems that have them.  */
519#ifndef _GNU_SOURCE
520# undef _GNU_SOURCE
521#endif
522/* Enable threading extensions on Solaris.  */
523#ifndef _POSIX_PTHREAD_SEMANTICS
524# undef _POSIX_PTHREAD_SEMANTICS
525#endif
526/* Enable extensions on HP NonStop.  */
527#ifndef _TANDEM_SOURCE
528# undef _TANDEM_SOURCE
529#endif
530/* Enable general extensions on Solaris.  */
531#ifndef __EXTENSIONS__
532# undef __EXTENSIONS__
533#endif
534
535
536/* Whether the windows socket API is used */
537#undef USE_WINSOCK
538
539/* the version of the windows API enabled */
540#undef WINVER
541
542/* Define if you want Python module. */
543#undef WITH_PYTHONMODULE
544
545/* Define if you want PyUnbound. */
546#undef WITH_PYUNBOUND
547
548/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
549   `char[]'. */
550#undef YYTEXT_POINTER
551
552/* Enable large inode numbers on Mac OS X 10.5.  */
553#ifndef _DARWIN_USE_64_BIT_INODE
554# define _DARWIN_USE_64_BIT_INODE 1
555#endif
556
557/* Number of bits in a file offset, on hosts where this is settable. */
558#undef _FILE_OFFSET_BITS
559
560/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
561#undef _LARGEFILE_SOURCE
562
563/* Define for large files, on AIX-style hosts. */
564#undef _LARGE_FILES
565
566/* Define to 1 if on MINIX. */
567#undef _MINIX
568
569/* Define to 2 if the system does not provide POSIX.1 features except with
570   this defined. */
571#undef _POSIX_1_SOURCE
572
573/* Define to 1 if you need to in order for `stat' and other things to work. */
574#undef _POSIX_SOURCE
575
576/* Define to empty if `const' does not conform to ANSI C. */
577#undef const
578
579/* Define to `int' if <sys/types.h> doesn't define. */
580#undef gid_t
581
582/* in_addr_t */
583#undef in_addr_t
584
585/* in_port_t */
586#undef in_port_t
587
588/* Define to `__inline__' or `__inline' if that's what the C compiler
589   calls it, or to nothing if 'inline' is not supported under any name.  */
590#ifndef __cplusplus
591#undef inline
592#endif
593
594/* Define to `short' if <sys/types.h> does not define. */
595#undef int16_t
596
597/* Define to `int' if <sys/types.h> does not define. */
598#undef int32_t
599
600/* Define to `long long' if <sys/types.h> does not define. */
601#undef int64_t
602
603/* Define to `signed char' if <sys/types.h> does not define. */
604#undef int8_t
605
606/* Define if replacement function should be used. */
607#undef malloc
608
609/* Define to `long int' if <sys/types.h> does not define. */
610#undef off_t
611
612/* Define to `int' if <sys/types.h> does not define. */
613#undef pid_t
614
615/* Define to 'int' if not defined */
616#undef rlim_t
617
618/* Define to `unsigned int' if <sys/types.h> does not define. */
619#undef size_t
620
621/* Define to 'int' if not defined */
622#undef socklen_t
623
624/* Define to `int' if <sys/types.h> does not define. */
625#undef ssize_t
626
627/* Define to 'unsigned char if not defined */
628#undef u_char
629
630/* Define to `int' if <sys/types.h> doesn't define. */
631#undef uid_t
632
633/* Define to `unsigned short' if <sys/types.h> does not define. */
634#undef uint16_t
635
636/* Define to `unsigned int' if <sys/types.h> does not define. */
637#undef uint32_t
638
639/* Define to `unsigned long long' if <sys/types.h> does not define. */
640#undef uint64_t
641
642/* Define to `unsigned char' if <sys/types.h> does not define. */
643#undef uint8_t
644
645/* Define as `fork' if `vfork' does not work. */
646#undef vfork
647
648#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
649#define _GNU_SOURCE 1
650#endif 
651
652#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
653#define _BSD_SOURCE 1
654#endif 
655
656#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
657#define __EXTENSIONS__ 1
658#endif 
659
660#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
661#define _POSIX_C_SOURCE 200112
662#endif 
663
664#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
665#define _XOPEN_SOURCE 600
666#endif 
667
668#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
669#define _XOPEN_SOURCE_EXTENDED 1
670#endif 
671
672#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
673#define _ALL_SOURCE 1
674#endif 
675
676#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
677#define _LARGEFILE_SOURCE 1
678#endif 
679
680
681
682
683#ifndef UNBOUND_DEBUG
684#  define NDEBUG
685#endif
686
687#include <stdio.h>
688#include <string.h>
689#include <unistd.h>
690#include <assert.h>
691
692#if STDC_HEADERS
693#include <stdlib.h>
694#include <stddef.h>
695#endif
696
697#ifdef HAVE_STDINT_H
698#include <stdint.h>
699#endif
700
701#include <errno.h>
702
703#if HAVE_SYS_PARAM_H
704#include <sys/param.h>
705#endif
706
707#ifdef HAVE_SYS_SOCKET_H
708#include <sys/socket.h>
709#endif
710
711#ifdef HAVE_SYS_UIO_H
712#include <sys/uio.h>
713#endif
714
715#ifdef HAVE_NETINET_IN_H
716#include <netinet/in.h>
717#endif
718
719#ifdef HAVE_ARPA_INET_H
720#include <arpa/inet.h>
721#endif
722
723#ifdef HAVE_WINSOCK2_H
724#include <winsock2.h>
725#endif
726
727#ifdef HAVE_WS2TCPIP_H
728#include <ws2tcpip.h>
729#endif
730
731
732 
733#ifdef HAVE_ATTR_FORMAT
734#  define ATTR_FORMAT(archetype, string_index, first_to_check) \
735    __attribute__ ((format (archetype, string_index, first_to_check)))
736#else /* !HAVE_ATTR_FORMAT */
737#  define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
738#endif /* !HAVE_ATTR_FORMAT */
739
740
741#if defined(DOXYGEN)
742#  define ATTR_UNUSED(x)  x
743#elif defined(__cplusplus)
744#  define ATTR_UNUSED(x)
745#elif defined(HAVE_ATTR_UNUSED)
746#  define ATTR_UNUSED(x)  x __attribute__((unused))
747#else /* !HAVE_ATTR_UNUSED */
748#  define ATTR_UNUSED(x)  x
749#endif /* !HAVE_ATTR_UNUSED */
750
751
752#ifndef HAVE_FSEEKO
753#define fseeko fseek
754#define ftello ftell
755#endif /* HAVE_FSEEKO */
756
757
758#ifndef MAXHOSTNAMELEN
759#define MAXHOSTNAMELEN 256
760#endif
761
762
763#ifndef HAVE_SNPRINTF
764#define snprintf snprintf_unbound
765#define vsnprintf vsnprintf_unbound
766#include <stdarg.h>
767int snprintf (char *str, size_t count, const char *fmt, ...);
768int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
769#endif /* HAVE_SNPRINTF */
770
771
772#ifndef HAVE_INET_PTON
773#define inet_pton inet_pton_unbound
774int inet_pton(int af, const char* src, void* dst);
775#endif /* HAVE_INET_PTON */
776
777
778#ifndef HAVE_INET_NTOP
779#define inet_ntop inet_ntop_unbound
780const char *inet_ntop(int af, const void *src, char *dst, size_t size);
781#endif
782
783
784#ifndef HAVE_INET_ATON
785#define inet_aton inet_aton_unbound
786int inet_aton(const char *cp, struct in_addr *addr);
787#endif
788
789
790#ifndef HAVE_MEMMOVE
791#define memmove memmove_unbound
792void *memmove(void *dest, const void *src, size_t n);
793#endif
794
795
796#ifndef HAVE_STRLCPY
797#define strlcpy strlcpy_unbound
798size_t strlcpy(char *dst, const char *src, size_t siz);
799#endif
800
801
802#ifndef HAVE_GMTIME_R
803#define gmtime_r gmtime_r_unbound
804struct tm *gmtime_r(const time_t *timep, struct tm *result);
805#endif
806
807
808#ifndef HAVE_SLEEP
809#define sleep(x) Sleep((x)*1000) /* on win32 */
810#endif /* HAVE_SLEEP */
811
812
813#ifndef HAVE_USLEEP
814#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
815#endif /* HAVE_USLEEP */
816
817
818#ifndef HAVE_RANDOM
819#define random rand /* on win32, for tests only (bad random) */
820#endif /* HAVE_RANDOM */
821
822
823#ifndef HAVE_SRANDOM
824#define srandom(x) srand(x) /* on win32, for tests only (bad random) */
825#endif /* HAVE_SRANDOM */
826
827
828/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
829#ifdef HAVE_WINSOCK2_H
830#define FD_SET_T (u_int)
831#else
832#define FD_SET_T 
833#endif
834
835
836#ifndef IPV6_MIN_MTU
837#define IPV6_MIN_MTU 1280
838#endif /* IPV6_MIN_MTU */
839
840
841#ifdef MEMCMP_IS_BROKEN
842#include "compat/memcmp.h"
843#define memcmp memcmp_unbound
844int memcmp(const void *x, const void *y, size_t n);
845#endif
846
847
848
849#ifndef HAVE_CTIME_R
850#define ctime_r unbound_ctime_r
851char *ctime_r(const time_t *timep, char *buf);
852#endif
853
854#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
855#define strptime unbound_strptime
856struct tm;
857char *strptime(const char *s, const char *format, struct tm *tm);
858#endif
859
860#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
861   /* using version of libevent that is not threadsafe. */
862#  define LIBEVENT_SIGNAL_PROBLEM 1
863#endif
864
865#ifndef CHECKED_INET6
866#  define CHECKED_INET6
867#  ifdef AF_INET6
868#    define INET6
869#  else
870#    define AF_INET6        28
871#  endif
872#endif /* CHECKED_INET6 */
873
874/* maximum nesting of included files */
875#define MAXINCLUDES 10
876#ifndef HAVE_GETADDRINFO
877struct sockaddr_storage;
878#include "compat/fake-rfc2553.h"
879#endif
880
881#ifdef UNBOUND_ALLOC_STATS
882#  define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
883#  define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
884#  define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
885#  define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
886void *unbound_stat_malloc(size_t size);
887void *unbound_stat_calloc(size_t nmemb, size_t size);
888void unbound_stat_free(void *ptr);
889void *unbound_stat_realloc(void *ptr, size_t size);
890void *unbound_stat_malloc_log(size_t size, const char* file, int line,
891	const char* func);
892void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
893	int line, const char* func);
894void unbound_stat_free_log(void *ptr, const char* file, int line,
895	const char* func);
896void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
897	int line, const char* func);
898#elif defined(UNBOUND_ALLOC_LITE)
899#  include "util/alloc.h"
900#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
901
902/** default port for DNS traffic. */
903#define UNBOUND_DNS_PORT 53
904/** default port for unbound control traffic, registered port with IANA,
905    ub-dns-control  8953/tcp    unbound dns nameserver control */
906#define UNBOUND_CONTROL_PORT 8953
907/** the version of unbound-control that this software implements */
908#define UNBOUND_CONTROL_VERSION 1
909
910
911