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