1238106Sdes/* config.h.in.  Generated from configure.ac by autoheader.  */
2238106Sdes
3238106Sdes/* Directory to chroot to */
4238106Sdes#undef CHROOT_DIR
5238106Sdes
6285206Sdes/* Do sha512 definitions in config.h */
7285206Sdes#undef COMPAT_SHA512
8285206Sdes
9238106Sdes/* Pathname to the Unbound configuration file */
10238106Sdes#undef CONFIGFILE
11238106Sdes
12238106Sdes/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
13238106Sdes   */
14238106Sdes#undef DARWIN_BROKEN_SETREUID
15238106Sdes
16238106Sdes/* Whether daemon is deprecated */
17238106Sdes#undef DEPRECATED_DAEMON
18238106Sdes
19285206Sdes/* default dnstap socket path */
20285206Sdes#undef DNSTAP_SOCKET_PATH
21285206Sdes
22238106Sdes/* Define if you want to use debug lock checking (slow). */
23238106Sdes#undef ENABLE_LOCK_CHECKS
24238106Sdes
25238106Sdes/* Define this if you enabled-allsymbols from libunbound to link binaries to
26238106Sdes   it for smaller install size, but the libunbound export table is polluted by
27238106Sdes   internal symbols */
28238106Sdes#undef EXPORT_ALL_SYMBOLS
29238106Sdes
30285206Sdes/* Define to 1 if you have the `arc4random' function. */
31285206Sdes#undef HAVE_ARC4RANDOM
32285206Sdes
33285206Sdes/* Define to 1 if you have the `arc4random_uniform' function. */
34285206Sdes#undef HAVE_ARC4RANDOM_UNIFORM
35285206Sdes
36238106Sdes/* Define to 1 if you have the <arpa/inet.h> header file. */
37238106Sdes#undef HAVE_ARPA_INET_H
38238106Sdes
39238106Sdes/* Whether the C compiler accepts the "format" attribute */
40238106Sdes#undef HAVE_ATTR_FORMAT
41238106Sdes
42238106Sdes/* Whether the C compiler accepts the "unused" attribute */
43238106Sdes#undef HAVE_ATTR_UNUSED
44238106Sdes
45285206Sdes/* Define to 1 if you have the `chown' function. */
46238106Sdes#undef HAVE_CHOWN
47238106Sdes
48238106Sdes/* Define to 1 if you have the `chroot' function. */
49238106Sdes#undef HAVE_CHROOT
50238106Sdes
51238106Sdes/* Define to 1 if you have the `ctime_r' function. */
52238106Sdes#undef HAVE_CTIME_R
53238106Sdes
54238106Sdes/* Define to 1 if you have the `daemon' function. */
55238106Sdes#undef HAVE_DAEMON
56238106Sdes
57285206Sdes/* Define to 1 if you have the declaration of `arc4random', and to 0 if you
58285206Sdes   don't. */
59285206Sdes#undef HAVE_DECL_ARC4RANDOM
60285206Sdes
61285206Sdes/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
62285206Sdes   if you don't. */
63285206Sdes#undef HAVE_DECL_ARC4RANDOM_UNIFORM
64285206Sdes
65238106Sdes/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
66238106Sdes   don't. */
67238106Sdes#undef HAVE_DECL_NID_SECP384R1
68238106Sdes
69238106Sdes/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
70238106Sdes   if you don't. */
71238106Sdes#undef HAVE_DECL_NID_X9_62_PRIME256V1
72238106Sdes
73291767Sdes/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
74291767Sdes   don't. */
75291767Sdes#undef HAVE_DECL_REALLOCARRAY
76291767Sdes
77238106Sdes/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
78238106Sdes   if you don't. */
79238106Sdes#undef HAVE_DECL_SK_SSL_COMP_POP_FREE
80238106Sdes
81238106Sdes/* Define to 1 if you have the declaration of
82238106Sdes   `SSL_COMP_get_compression_methods', and to 0 if you don't. */
83238106Sdes#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
84238106Sdes
85291767Sdes/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
86291767Sdes   0 if you don't. */
87291767Sdes#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO
88291767Sdes
89285206Sdes/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
90285206Sdes   don't. */
91285206Sdes#undef HAVE_DECL_STRLCAT
92285206Sdes
93285206Sdes/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
94285206Sdes   don't. */
95285206Sdes#undef HAVE_DECL_STRLCPY
96285206Sdes
97294190Sdes/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
98294190Sdes   you don't. */
99294190Sdes#undef HAVE_DECL_XML_STOPPARSER
100294190Sdes
101238106Sdes/* Define to 1 if you have the <dlfcn.h> header file. */
102238106Sdes#undef HAVE_DLFCN_H
103238106Sdes
104285206Sdes/* Define to 1 if you have the <endian.h> header file. */
105285206Sdes#undef HAVE_ENDIAN_H
106285206Sdes
107269257Sdes/* Define to 1 if you have the `endprotoent' function. */
108269257Sdes#undef HAVE_ENDPROTOENT
109269257Sdes
110269257Sdes/* Define to 1 if you have the `endservent' function. */
111269257Sdes#undef HAVE_ENDSERVENT
112269257Sdes
113238106Sdes/* Define to 1 if you have the `event_base_free' function. */
114238106Sdes#undef HAVE_EVENT_BASE_FREE
115238106Sdes
116238106Sdes/* Define to 1 if you have the `event_base_get_method' function. */
117238106Sdes#undef HAVE_EVENT_BASE_GET_METHOD
118238106Sdes
119238106Sdes/* Define to 1 if you have the `event_base_new' function. */
120238106Sdes#undef HAVE_EVENT_BASE_NEW
121238106Sdes
122238106Sdes/* Define to 1 if you have the `event_base_once' function. */
123238106Sdes#undef HAVE_EVENT_BASE_ONCE
124238106Sdes
125238106Sdes/* Define to 1 if you have the <event.h> header file. */
126238106Sdes#undef HAVE_EVENT_H
127238106Sdes
128238106Sdes/* Define to 1 if you have the `EVP_sha1' function. */
129238106Sdes#undef HAVE_EVP_SHA1
130238106Sdes
131238106Sdes/* Define to 1 if you have the `EVP_sha256' function. */
132238106Sdes#undef HAVE_EVP_SHA256
133238106Sdes
134238106Sdes/* Define to 1 if you have the `EVP_sha512' function. */
135238106Sdes#undef HAVE_EVP_SHA512
136238106Sdes
137238106Sdes/* Define to 1 if you have the `ev_default_loop' function. */
138238106Sdes#undef HAVE_EV_DEFAULT_LOOP
139238106Sdes
140238106Sdes/* Define to 1 if you have the `ev_loop' function. */
141238106Sdes#undef HAVE_EV_LOOP
142238106Sdes
143238106Sdes/* Define to 1 if you have the <expat.h> header file. */
144238106Sdes#undef HAVE_EXPAT_H
145238106Sdes
146238106Sdes/* Define to 1 if you have the `fcntl' function. */
147238106Sdes#undef HAVE_FCNTL
148238106Sdes
149249141Sdes/* Define to 1 if you have the `FIPS_mode' function. */
150249141Sdes#undef HAVE_FIPS_MODE
151249141Sdes
152238106Sdes/* Define to 1 if you have the `fork' function. */
153238106Sdes#undef HAVE_FORK
154238106Sdes
155238106Sdes/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
156238106Sdes#undef HAVE_FSEEKO
157238106Sdes
158294190Sdes/* Define to 1 if you have the `fsync' function. */
159294190Sdes#undef HAVE_FSYNC
160294190Sdes
161238106Sdes/* Whether getaddrinfo is available */
162238106Sdes#undef HAVE_GETADDRINFO
163238106Sdes
164285206Sdes/* Define to 1 if you have the `getauxval' function. */
165285206Sdes#undef HAVE_GETAUXVAL
166285206Sdes
167285206Sdes/* Define to 1 if you have the `getentropy' function. */
168285206Sdes#undef HAVE_GETENTROPY
169285206Sdes
170238106Sdes/* Define to 1 if you have the <getopt.h> header file. */
171238106Sdes#undef HAVE_GETOPT_H
172238106Sdes
173238106Sdes/* Define to 1 if you have the `getpwnam' function. */
174238106Sdes#undef HAVE_GETPWNAM
175238106Sdes
176238106Sdes/* Define to 1 if you have the `getrlimit' function. */
177238106Sdes#undef HAVE_GETRLIMIT
178238106Sdes
179238106Sdes/* Define to 1 if you have the `glob' function. */
180238106Sdes#undef HAVE_GLOB
181238106Sdes
182238106Sdes/* Define to 1 if you have the <glob.h> header file. */
183238106Sdes#undef HAVE_GLOB_H
184238106Sdes
185238106Sdes/* Define to 1 if you have the `gmtime_r' function. */
186238106Sdes#undef HAVE_GMTIME_R
187238106Sdes
188238106Sdes/* Define to 1 if you have the <grp.h> header file. */
189238106Sdes#undef HAVE_GRP_H
190238106Sdes
191238106Sdes/* If you have HMAC_CTX_init */
192238106Sdes#undef HAVE_HMAC_CTX_INIT
193238106Sdes
194238106Sdes/* Define to 1 if you have the `inet_aton' function. */
195238106Sdes#undef HAVE_INET_ATON
196238106Sdes
197238106Sdes/* Define to 1 if you have the `inet_ntop' function. */
198238106Sdes#undef HAVE_INET_NTOP
199238106Sdes
200238106Sdes/* Define to 1 if you have the `inet_pton' function. */
201238106Sdes#undef HAVE_INET_PTON
202238106Sdes
203238106Sdes/* Define to 1 if you have the `initgroups' function. */
204238106Sdes#undef HAVE_INITGROUPS
205238106Sdes
206238106Sdes/* Define to 1 if you have the <inttypes.h> header file. */
207238106Sdes#undef HAVE_INTTYPES_H
208238106Sdes
209238106Sdes/* if the function 'ioctlsocket' is available */
210238106Sdes#undef HAVE_IOCTLSOCKET
211238106Sdes
212238106Sdes/* Define to 1 if you have the <iphlpapi.h> header file. */
213238106Sdes#undef HAVE_IPHLPAPI_H
214238106Sdes
215294190Sdes/* Define to 1 if you have the `isblank' function. */
216294190Sdes#undef HAVE_ISBLANK
217294190Sdes
218238106Sdes/* Define to 1 if you have the `kill' function. */
219238106Sdes#undef HAVE_KILL
220238106Sdes
221285206Sdes/* Define if we have LibreSSL */
222285206Sdes#undef HAVE_LIBRESSL
223285206Sdes
224238106Sdes/* Define to 1 if you have the `localtime_r' function. */
225238106Sdes#undef HAVE_LOCALTIME_R
226238106Sdes
227238106Sdes/* Define to 1 if you have the <login_cap.h> header file. */
228238106Sdes#undef HAVE_LOGIN_CAP_H
229238106Sdes
230238106Sdes/* If have GNU libc compatible malloc */
231238106Sdes#undef HAVE_MALLOC
232238106Sdes
233238106Sdes/* Define to 1 if you have the `memmove' function. */
234238106Sdes#undef HAVE_MEMMOVE
235238106Sdes
236238106Sdes/* Define to 1 if you have the <memory.h> header file. */
237238106Sdes#undef HAVE_MEMORY_H
238238106Sdes
239238106Sdes/* Define to 1 if you have the <netdb.h> header file. */
240238106Sdes#undef HAVE_NETDB_H
241238106Sdes
242238106Sdes/* Define to 1 if you have the <netinet/in.h> header file. */
243238106Sdes#undef HAVE_NETINET_IN_H
244238106Sdes
245294190Sdes/* Use libnettle for crypto */
246294190Sdes#undef HAVE_NETTLE
247294190Sdes
248249141Sdes/* Use libnss for crypto */
249249141Sdes#undef HAVE_NSS
250249141Sdes
251238106Sdes/* Define to 1 if you have the `OPENSSL_config' function. */
252238106Sdes#undef HAVE_OPENSSL_CONFIG
253238106Sdes
254238106Sdes/* Define to 1 if you have the <openssl/conf.h> header file. */
255238106Sdes#undef HAVE_OPENSSL_CONF_H
256238106Sdes
257238106Sdes/* Define to 1 if you have the <openssl/engine.h> header file. */
258238106Sdes#undef HAVE_OPENSSL_ENGINE_H
259238106Sdes
260238106Sdes/* Define to 1 if you have the <openssl/err.h> header file. */
261238106Sdes#undef HAVE_OPENSSL_ERR_H
262238106Sdes
263238106Sdes/* Define to 1 if you have the <openssl/rand.h> header file. */
264238106Sdes#undef HAVE_OPENSSL_RAND_H
265238106Sdes
266238106Sdes/* Define to 1 if you have the <openssl/ssl.h> header file. */
267238106Sdes#undef HAVE_OPENSSL_SSL_H
268238106Sdes
269238106Sdes/* Define if you have POSIX threads libraries and header files. */
270238106Sdes#undef HAVE_PTHREAD
271238106Sdes
272269257Sdes/* Have PTHREAD_PRIO_INHERIT. */
273269257Sdes#undef HAVE_PTHREAD_PRIO_INHERIT
274269257Sdes
275238106Sdes/* Define to 1 if the system has the type `pthread_rwlock_t'. */
276238106Sdes#undef HAVE_PTHREAD_RWLOCK_T
277238106Sdes
278238106Sdes/* Define to 1 if the system has the type `pthread_spinlock_t'. */
279238106Sdes#undef HAVE_PTHREAD_SPINLOCK_T
280238106Sdes
281238106Sdes/* Define to 1 if you have the <pwd.h> header file. */
282238106Sdes#undef HAVE_PWD_H
283238106Sdes
284238106Sdes/* Define if you have Python libraries and header files. */
285238106Sdes#undef HAVE_PYTHON
286238106Sdes
287238106Sdes/* Define to 1 if you have the `random' function. */
288238106Sdes#undef HAVE_RANDOM
289238106Sdes
290291767Sdes/* Define to 1 if you have the `reallocarray' function. */
291291767Sdes#undef HAVE_REALLOCARRAY
292291767Sdes
293238106Sdes/* Define to 1 if you have the `recvmsg' function. */
294238106Sdes#undef HAVE_RECVMSG
295238106Sdes
296238106Sdes/* Define to 1 if you have the `sbrk' function. */
297238106Sdes#undef HAVE_SBRK
298238106Sdes
299238106Sdes/* Define to 1 if you have the `sendmsg' function. */
300238106Sdes#undef HAVE_SENDMSG
301238106Sdes
302238106Sdes/* Define to 1 if you have the `setregid' function. */
303238106Sdes#undef HAVE_SETREGID
304238106Sdes
305238106Sdes/* Define to 1 if you have the `setresgid' function. */
306238106Sdes#undef HAVE_SETRESGID
307238106Sdes
308238106Sdes/* Define to 1 if you have the `setresuid' function. */
309238106Sdes#undef HAVE_SETRESUID
310238106Sdes
311238106Sdes/* Define to 1 if you have the `setreuid' function. */
312238106Sdes#undef HAVE_SETREUID
313238106Sdes
314238106Sdes/* Define to 1 if you have the `setrlimit' function. */
315238106Sdes#undef HAVE_SETRLIMIT
316238106Sdes
317238106Sdes/* Define to 1 if you have the `setsid' function. */
318238106Sdes#undef HAVE_SETSID
319238106Sdes
320238106Sdes/* Define to 1 if you have the `setusercontext' function. */
321238106Sdes#undef HAVE_SETUSERCONTEXT
322238106Sdes
323285206Sdes/* Define to 1 if you have the `SHA512_Update' function. */
324285206Sdes#undef HAVE_SHA512_UPDATE
325285206Sdes
326238106Sdes/* Define to 1 if you have the `sigprocmask' function. */
327238106Sdes#undef HAVE_SIGPROCMASK
328238106Sdes
329238106Sdes/* Define to 1 if you have the `sleep' function. */
330238106Sdes#undef HAVE_SLEEP
331238106Sdes
332238106Sdes/* Define to 1 if you have the `snprintf' function. */
333238106Sdes#undef HAVE_SNPRINTF
334238106Sdes
335238106Sdes/* Define to 1 if you have the `socketpair' function. */
336238106Sdes#undef HAVE_SOCKETPAIR
337238106Sdes
338238106Sdes/* Using Solaris threads */
339238106Sdes#undef HAVE_SOLARIS_THREADS
340238106Sdes
341238106Sdes/* Define to 1 if you have the `srandom' function. */
342238106Sdes#undef HAVE_SRANDOM
343238106Sdes
344238106Sdes/* Define if you have the SSL libraries installed. */
345238106Sdes#undef HAVE_SSL
346238106Sdes
347238106Sdes/* Define to 1 if you have the <stdarg.h> header file. */
348238106Sdes#undef HAVE_STDARG_H
349238106Sdes
350238106Sdes/* Define to 1 if you have the <stdbool.h> header file. */
351238106Sdes#undef HAVE_STDBOOL_H
352238106Sdes
353238106Sdes/* Define to 1 if you have the <stdint.h> header file. */
354238106Sdes#undef HAVE_STDINT_H
355238106Sdes
356238106Sdes/* Define to 1 if you have the <stdlib.h> header file. */
357238106Sdes#undef HAVE_STDLIB_H
358238106Sdes
359238106Sdes/* Define to 1 if you have the `strftime' function. */
360238106Sdes#undef HAVE_STRFTIME
361238106Sdes
362238106Sdes/* Define to 1 if you have the <strings.h> header file. */
363238106Sdes#undef HAVE_STRINGS_H
364238106Sdes
365238106Sdes/* Define to 1 if you have the <string.h> header file. */
366238106Sdes#undef HAVE_STRING_H
367238106Sdes
368269257Sdes/* Define to 1 if you have the `strlcat' function. */
369269257Sdes#undef HAVE_STRLCAT
370269257Sdes
371238106Sdes/* Define to 1 if you have the `strlcpy' function. */
372238106Sdes#undef HAVE_STRLCPY
373238106Sdes
374238106Sdes/* Define to 1 if you have the `strptime' function. */
375238106Sdes#undef HAVE_STRPTIME
376238106Sdes
377238106Sdes/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
378238106Sdes#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
379238106Sdes
380285206Sdes/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
381285206Sdes#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
382285206Sdes
383238106Sdes/* Define if you have Swig libraries and header files. */
384238106Sdes#undef HAVE_SWIG
385238106Sdes
386238106Sdes/* Define to 1 if you have the <syslog.h> header file. */
387238106Sdes#undef HAVE_SYSLOG_H
388238106Sdes
389238106Sdes/* Define to 1 if you have the <sys/param.h> header file. */
390238106Sdes#undef HAVE_SYS_PARAM_H
391238106Sdes
392238106Sdes/* Define to 1 if you have the <sys/resource.h> header file. */
393238106Sdes#undef HAVE_SYS_RESOURCE_H
394238106Sdes
395285206Sdes/* Define to 1 if you have the <sys/sha2.h> header file. */
396285206Sdes#undef HAVE_SYS_SHA2_H
397285206Sdes
398238106Sdes/* Define to 1 if you have the <sys/socket.h> header file. */
399238106Sdes#undef HAVE_SYS_SOCKET_H
400238106Sdes
401238106Sdes/* Define to 1 if you have the <sys/stat.h> header file. */
402238106Sdes#undef HAVE_SYS_STAT_H
403238106Sdes
404285206Sdes/* Define to 1 if you have the <sys/sysctl.h> header file. */
405285206Sdes#undef HAVE_SYS_SYSCTL_H
406285206Sdes
407238106Sdes/* Define to 1 if you have the <sys/types.h> header file. */
408238106Sdes#undef HAVE_SYS_TYPES_H
409238106Sdes
410238106Sdes/* Define to 1 if you have the <sys/uio.h> header file. */
411238106Sdes#undef HAVE_SYS_UIO_H
412238106Sdes
413285206Sdes/* Define to 1 if you have the <sys/un.h> header file. */
414285206Sdes#undef HAVE_SYS_UN_H
415285206Sdes
416238106Sdes/* Define to 1 if you have the <sys/wait.h> header file. */
417238106Sdes#undef HAVE_SYS_WAIT_H
418238106Sdes
419238106Sdes/* Define to 1 if you have the <time.h> header file. */
420238106Sdes#undef HAVE_TIME_H
421238106Sdes
422238106Sdes/* Define to 1 if you have the `tzset' function. */
423238106Sdes#undef HAVE_TZSET
424238106Sdes
425238106Sdes/* Define to 1 if you have the <unistd.h> header file. */
426238106Sdes#undef HAVE_UNISTD_H
427238106Sdes
428238106Sdes/* Define to 1 if you have the `usleep' function. */
429238106Sdes#undef HAVE_USLEEP
430238106Sdes
431238106Sdes/* Define to 1 if you have the `vfork' function. */
432238106Sdes#undef HAVE_VFORK
433238106Sdes
434238106Sdes/* Define to 1 if you have the <vfork.h> header file. */
435238106Sdes#undef HAVE_VFORK_H
436238106Sdes
437238106Sdes/* Define to 1 if you have the <windows.h> header file. */
438238106Sdes#undef HAVE_WINDOWS_H
439238106Sdes
440238106Sdes/* Using Windows threads */
441238106Sdes#undef HAVE_WINDOWS_THREADS
442238106Sdes
443238106Sdes/* Define to 1 if you have the <winsock2.h> header file. */
444238106Sdes#undef HAVE_WINSOCK2_H
445238106Sdes
446238106Sdes/* Define to 1 if `fork' works. */
447238106Sdes#undef HAVE_WORKING_FORK
448238106Sdes
449238106Sdes/* Define to 1 if `vfork' works. */
450238106Sdes#undef HAVE_WORKING_VFORK
451238106Sdes
452238106Sdes/* Define to 1 if you have the `writev' function. */
453238106Sdes#undef HAVE_WRITEV
454238106Sdes
455238106Sdes/* Define to 1 if you have the <ws2tcpip.h> header file. */
456238106Sdes#undef HAVE_WS2TCPIP_H
457238106Sdes
458238106Sdes/* Define to 1 if you have the `_beginthreadex' function. */
459238106Sdes#undef HAVE__BEGINTHREADEX
460238106Sdes
461238106Sdes/* if lex has yylex_destroy */
462238106Sdes#undef LEX_HAS_YYLEX_DESTROY
463238106Sdes
464238106Sdes/* Define to the sub-directory in which libtool stores uninstalled libraries.
465238106Sdes   */
466238106Sdes#undef LT_OBJDIR
467238106Sdes
468238106Sdes/* Define to the maximum message length to pass to syslog. */
469238106Sdes#undef MAXSYSLOGMSGLEN
470238106Sdes
471238106Sdes/* Define if memcmp() does not compare unsigned bytes */
472238106Sdes#undef MEMCMP_IS_BROKEN
473238106Sdes
474238106Sdes/* Define if mkdir has one argument. */
475238106Sdes#undef MKDIR_HAS_ONE_ARG
476238106Sdes
477238106Sdes/* Define if the network stack does not fully support nonblocking io (causes
478238106Sdes   lower performance). */
479238106Sdes#undef NONBLOCKING_IS_BROKEN
480238106Sdes
481238106Sdes/* Put -D_ALL_SOURCE define in config.h */
482238106Sdes#undef OMITTED__D_ALL_SOURCE
483238106Sdes
484238106Sdes/* Put -D_BSD_SOURCE define in config.h */
485238106Sdes#undef OMITTED__D_BSD_SOURCE
486238106Sdes
487238106Sdes/* Put -D_GNU_SOURCE define in config.h */
488238106Sdes#undef OMITTED__D_GNU_SOURCE
489238106Sdes
490238106Sdes/* Put -D_LARGEFILE_SOURCE=1 define in config.h */
491238106Sdes#undef OMITTED__D_LARGEFILE_SOURCE_1
492238106Sdes
493238106Sdes/* Put -D_POSIX_C_SOURCE=200112 define in config.h */
494238106Sdes#undef OMITTED__D_POSIX_C_SOURCE_200112
495238106Sdes
496238106Sdes/* Put -D_XOPEN_SOURCE=600 define in config.h */
497238106Sdes#undef OMITTED__D_XOPEN_SOURCE_600
498238106Sdes
499238106Sdes/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
500238106Sdes#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1
501238106Sdes
502238106Sdes/* Put -D__EXTENSIONS__ define in config.h */
503238106Sdes#undef OMITTED__D__EXTENSIONS__
504238106Sdes
505238106Sdes/* Define to the address where bug reports for this package should be sent. */
506238106Sdes#undef PACKAGE_BUGREPORT
507238106Sdes
508238106Sdes/* Define to the full name of this package. */
509238106Sdes#undef PACKAGE_NAME
510238106Sdes
511238106Sdes/* Define to the full name and version of this package. */
512238106Sdes#undef PACKAGE_STRING
513238106Sdes
514238106Sdes/* Define to the one symbol short name of this package. */
515238106Sdes#undef PACKAGE_TARNAME
516238106Sdes
517238106Sdes/* Define to the home page for this package. */
518238106Sdes#undef PACKAGE_URL
519238106Sdes
520238106Sdes/* Define to the version of this package. */
521238106Sdes#undef PACKAGE_VERSION
522238106Sdes
523238106Sdes/* default pidfile location */
524238106Sdes#undef PIDFILE
525238106Sdes
526238106Sdes/* Define to necessary symbol if this constant uses a non-standard name on
527238106Sdes   your system. */
528238106Sdes#undef PTHREAD_CREATE_JOINABLE
529238106Sdes
530238106Sdes/* Define as the return type of signal handlers (`int' or `void'). */
531238106Sdes#undef RETSIGTYPE
532238106Sdes
533238106Sdes/* default rootkey location */
534238106Sdes#undef ROOT_ANCHOR_FILE
535238106Sdes
536238106Sdes/* default rootcert location */
537238106Sdes#undef ROOT_CERT_FILE
538238106Sdes
539238106Sdes/* version number for resource files */
540238106Sdes#undef RSRC_PACKAGE_VERSION
541238106Sdes
542238106Sdes/* Directory to chdir to */
543238106Sdes#undef RUN_DIR
544238106Sdes
545238106Sdes/* Shared data */
546238106Sdes#undef SHARE_DIR
547238106Sdes
548269257Sdes/* The size of `time_t', as computed by sizeof. */
549269257Sdes#undef SIZEOF_TIME_T
550269257Sdes
551294190Sdes/* define if (v)snprintf does not return length needed, (but length used) */
552294190Sdes#undef SNPRINTF_RET_BROKEN
553294190Sdes
554238106Sdes/* Define to 1 if you have the ANSI C header files. */
555238106Sdes#undef STDC_HEADERS
556238106Sdes
557238106Sdes/* use default strptime. */
558238106Sdes#undef STRPTIME_WORKS
559238106Sdes
560238106Sdes/* Use win32 resources and API */
561238106Sdes#undef UB_ON_WINDOWS
562238106Sdes
563238106Sdes/* default username */
564238106Sdes#undef UB_USERNAME
565238106Sdes
566238106Sdes/* use to enable lightweight alloc assertions, for debug use */
567238106Sdes#undef UNBOUND_ALLOC_LITE
568238106Sdes
569238106Sdes/* use malloc not regions, for debug use */
570238106Sdes#undef UNBOUND_ALLOC_NONREGIONAL
571238106Sdes
572238106Sdes/* use statistics for allocs and frees, for debug use */
573238106Sdes#undef UNBOUND_ALLOC_STATS
574238106Sdes
575238106Sdes/* define this to enable debug checks. */
576238106Sdes#undef UNBOUND_DEBUG
577238106Sdes
578285206Sdes/* Define to 1 to enable dnstap support */
579285206Sdes#undef USE_DNSTAP
580285206Sdes
581238106Sdes/* Define this to enable ECDSA support. */
582238106Sdes#undef USE_ECDSA
583238106Sdes
584238106Sdes/* Define this to enable an EVP workaround for older openssl */
585238106Sdes#undef USE_ECDSA_EVP_WORKAROUND
586238106Sdes
587238106Sdes/* Define this to enable GOST support. */
588238106Sdes#undef USE_GOST
589238106Sdes
590238106Sdes/* Define if you want to use internal select based events */
591238106Sdes#undef USE_MINI_EVENT
592238106Sdes
593238106Sdes/* Define this to enable SHA256 and SHA512 support. */
594238106Sdes#undef USE_SHA2
595238106Sdes
596238106Sdes/* Enable extensions on AIX 3, Interix.  */
597238106Sdes#ifndef _ALL_SOURCE
598238106Sdes# undef _ALL_SOURCE
599238106Sdes#endif
600238106Sdes/* Enable GNU extensions on systems that have them.  */
601238106Sdes#ifndef _GNU_SOURCE
602238106Sdes# undef _GNU_SOURCE
603238106Sdes#endif
604238106Sdes/* Enable threading extensions on Solaris.  */
605238106Sdes#ifndef _POSIX_PTHREAD_SEMANTICS
606238106Sdes# undef _POSIX_PTHREAD_SEMANTICS
607238106Sdes#endif
608238106Sdes/* Enable extensions on HP NonStop.  */
609238106Sdes#ifndef _TANDEM_SOURCE
610238106Sdes# undef _TANDEM_SOURCE
611238106Sdes#endif
612238106Sdes/* Enable general extensions on Solaris.  */
613238106Sdes#ifndef __EXTENSIONS__
614238106Sdes# undef __EXTENSIONS__
615238106Sdes#endif
616238106Sdes
617238106Sdes
618238106Sdes/* Whether the windows socket API is used */
619238106Sdes#undef USE_WINSOCK
620238106Sdes
621238106Sdes/* the version of the windows API enabled */
622238106Sdes#undef WINVER
623238106Sdes
624238106Sdes/* Define if you want Python module. */
625238106Sdes#undef WITH_PYTHONMODULE
626238106Sdes
627238106Sdes/* Define if you want PyUnbound. */
628238106Sdes#undef WITH_PYUNBOUND
629238106Sdes
630238106Sdes/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
631238106Sdes   `char[]'. */
632238106Sdes#undef YYTEXT_POINTER
633238106Sdes
634249141Sdes/* Enable large inode numbers on Mac OS X 10.5.  */
635249141Sdes#ifndef _DARWIN_USE_64_BIT_INODE
636249141Sdes# define _DARWIN_USE_64_BIT_INODE 1
637249141Sdes#endif
638249141Sdes
639238106Sdes/* Number of bits in a file offset, on hosts where this is settable. */
640238106Sdes#undef _FILE_OFFSET_BITS
641238106Sdes
642238106Sdes/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
643238106Sdes#undef _LARGEFILE_SOURCE
644238106Sdes
645238106Sdes/* Define for large files, on AIX-style hosts. */
646238106Sdes#undef _LARGE_FILES
647238106Sdes
648238106Sdes/* Define to 1 if on MINIX. */
649238106Sdes#undef _MINIX
650238106Sdes
651269257Sdes/* Enable for compile on Minix */
652269257Sdes#undef _NETBSD_SOURCE
653269257Sdes
654238106Sdes/* Define to 2 if the system does not provide POSIX.1 features except with
655238106Sdes   this defined. */
656238106Sdes#undef _POSIX_1_SOURCE
657238106Sdes
658238106Sdes/* Define to 1 if you need to in order for `stat' and other things to work. */
659238106Sdes#undef _POSIX_SOURCE
660238106Sdes
661238106Sdes/* Define to empty if `const' does not conform to ANSI C. */
662238106Sdes#undef const
663238106Sdes
664238106Sdes/* Define to `int' if <sys/types.h> doesn't define. */
665238106Sdes#undef gid_t
666238106Sdes
667238106Sdes/* in_addr_t */
668238106Sdes#undef in_addr_t
669238106Sdes
670238106Sdes/* in_port_t */
671238106Sdes#undef in_port_t
672238106Sdes
673238106Sdes/* Define to `__inline__' or `__inline' if that's what the C compiler
674238106Sdes   calls it, or to nothing if 'inline' is not supported under any name.  */
675238106Sdes#ifndef __cplusplus
676238106Sdes#undef inline
677238106Sdes#endif
678238106Sdes
679238106Sdes/* Define to `short' if <sys/types.h> does not define. */
680238106Sdes#undef int16_t
681238106Sdes
682238106Sdes/* Define to `int' if <sys/types.h> does not define. */
683238106Sdes#undef int32_t
684238106Sdes
685238106Sdes/* Define to `long long' if <sys/types.h> does not define. */
686238106Sdes#undef int64_t
687238106Sdes
688238106Sdes/* Define to `signed char' if <sys/types.h> does not define. */
689238106Sdes#undef int8_t
690238106Sdes
691238106Sdes/* Define if replacement function should be used. */
692238106Sdes#undef malloc
693238106Sdes
694238106Sdes/* Define to `long int' if <sys/types.h> does not define. */
695238106Sdes#undef off_t
696238106Sdes
697238106Sdes/* Define to `int' if <sys/types.h> does not define. */
698238106Sdes#undef pid_t
699238106Sdes
700238106Sdes/* Define to 'int' if not defined */
701238106Sdes#undef rlim_t
702238106Sdes
703238106Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */
704238106Sdes#undef size_t
705238106Sdes
706238106Sdes/* Define to 'int' if not defined */
707238106Sdes#undef socklen_t
708238106Sdes
709238106Sdes/* Define to `int' if <sys/types.h> does not define. */
710238106Sdes#undef ssize_t
711238106Sdes
712238106Sdes/* Define to 'unsigned char if not defined */
713238106Sdes#undef u_char
714238106Sdes
715238106Sdes/* Define to `int' if <sys/types.h> doesn't define. */
716238106Sdes#undef uid_t
717238106Sdes
718238106Sdes/* Define to `unsigned short' if <sys/types.h> does not define. */
719238106Sdes#undef uint16_t
720238106Sdes
721238106Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */
722238106Sdes#undef uint32_t
723238106Sdes
724238106Sdes/* Define to `unsigned long long' if <sys/types.h> does not define. */
725238106Sdes#undef uint64_t
726238106Sdes
727238106Sdes/* Define to `unsigned char' if <sys/types.h> does not define. */
728238106Sdes#undef uint8_t
729238106Sdes
730238106Sdes/* Define as `fork' if `vfork' does not work. */
731238106Sdes#undef vfork
732238106Sdes
733238106Sdes#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
734238106Sdes#define _GNU_SOURCE 1
735238106Sdes#endif 
736238106Sdes
737238106Sdes#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
738238106Sdes#define _BSD_SOURCE 1
739238106Sdes#endif 
740238106Sdes
741238106Sdes#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
742238106Sdes#define __EXTENSIONS__ 1
743238106Sdes#endif 
744238106Sdes
745238106Sdes#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
746238106Sdes#define _POSIX_C_SOURCE 200112
747238106Sdes#endif 
748238106Sdes
749238106Sdes#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
750238106Sdes#define _XOPEN_SOURCE 600
751238106Sdes#endif 
752238106Sdes
753238106Sdes#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
754238106Sdes#define _XOPEN_SOURCE_EXTENDED 1
755238106Sdes#endif 
756238106Sdes
757238106Sdes#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
758238106Sdes#define _ALL_SOURCE 1
759238106Sdes#endif 
760238106Sdes
761238106Sdes#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
762238106Sdes#define _LARGEFILE_SOURCE 1
763238106Sdes#endif 
764238106Sdes
765238106Sdes
766238106Sdes
767238106Sdes
768238106Sdes#ifndef UNBOUND_DEBUG
769238106Sdes#  define NDEBUG
770238106Sdes#endif
771238106Sdes
772269257Sdes/** Use small-ldns codebase */
773269257Sdes#define USE_SLDNS 1
774269257Sdes#ifdef HAVE_SSL
775269257Sdes#  define LDNS_BUILD_CONFIG_HAVE_SSL 1
776269257Sdes#endif
777269257Sdes
778238106Sdes#include <stdio.h>
779238106Sdes#include <string.h>
780238106Sdes#include <unistd.h>
781238106Sdes#include <assert.h>
782238106Sdes
783238106Sdes#if STDC_HEADERS
784238106Sdes#include <stdlib.h>
785238106Sdes#include <stddef.h>
786238106Sdes#endif
787238106Sdes
788269257Sdes#ifdef HAVE_STDARG_H
789269257Sdes#include <stdarg.h>
790269257Sdes#endif
791269257Sdes
792238106Sdes#ifdef HAVE_STDINT_H
793238106Sdes#include <stdint.h>
794238106Sdes#endif
795238106Sdes
796238106Sdes#include <errno.h>
797238106Sdes
798238106Sdes#if HAVE_SYS_PARAM_H
799238106Sdes#include <sys/param.h>
800238106Sdes#endif
801238106Sdes
802238106Sdes#ifdef HAVE_SYS_SOCKET_H
803238106Sdes#include <sys/socket.h>
804238106Sdes#endif
805238106Sdes
806238106Sdes#ifdef HAVE_SYS_UIO_H
807238106Sdes#include <sys/uio.h>
808238106Sdes#endif
809238106Sdes
810238106Sdes#ifdef HAVE_NETINET_IN_H
811238106Sdes#include <netinet/in.h>
812238106Sdes#endif
813238106Sdes
814238106Sdes#ifdef HAVE_ARPA_INET_H
815238106Sdes#include <arpa/inet.h>
816238106Sdes#endif
817238106Sdes
818238106Sdes#ifdef HAVE_WINSOCK2_H
819238106Sdes#include <winsock2.h>
820238106Sdes#endif
821238106Sdes
822238106Sdes#ifdef HAVE_WS2TCPIP_H
823238106Sdes#include <ws2tcpip.h>
824238106Sdes#endif
825238106Sdes
826269257Sdes#ifndef USE_WINSOCK
827269257Sdes#define ARG_LL "%ll"
828269257Sdes#else
829269257Sdes#define ARG_LL "%I64"
830269257Sdes#endif
831238106Sdes
832285206Sdes#ifndef AF_LOCAL
833285206Sdes#define AF_LOCAL AF_UNIX
834285206Sdes#endif
835269257Sdes
836285206Sdes
837238106Sdes 
838238106Sdes#ifdef HAVE_ATTR_FORMAT
839238106Sdes#  define ATTR_FORMAT(archetype, string_index, first_to_check) \
840238106Sdes    __attribute__ ((format (archetype, string_index, first_to_check)))
841238106Sdes#else /* !HAVE_ATTR_FORMAT */
842238106Sdes#  define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
843238106Sdes#endif /* !HAVE_ATTR_FORMAT */
844238106Sdes
845238106Sdes
846238106Sdes#if defined(DOXYGEN)
847238106Sdes#  define ATTR_UNUSED(x)  x
848238106Sdes#elif defined(__cplusplus)
849238106Sdes#  define ATTR_UNUSED(x)
850238106Sdes#elif defined(HAVE_ATTR_UNUSED)
851238106Sdes#  define ATTR_UNUSED(x)  x __attribute__((unused))
852238106Sdes#else /* !HAVE_ATTR_UNUSED */
853238106Sdes#  define ATTR_UNUSED(x)  x
854238106Sdes#endif /* !HAVE_ATTR_UNUSED */
855238106Sdes
856238106Sdes
857238106Sdes#ifndef HAVE_FSEEKO
858238106Sdes#define fseeko fseek
859238106Sdes#define ftello ftell
860238106Sdes#endif /* HAVE_FSEEKO */
861238106Sdes
862238106Sdes
863238106Sdes#ifndef MAXHOSTNAMELEN
864238106Sdes#define MAXHOSTNAMELEN 256
865238106Sdes#endif
866238106Sdes
867294190Sdes#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
868238106Sdes#define snprintf snprintf_unbound
869238106Sdes#define vsnprintf vsnprintf_unbound
870238106Sdes#include <stdarg.h>
871238106Sdesint snprintf (char *str, size_t count, const char *fmt, ...);
872238106Sdesint vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
873294190Sdes#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
874238106Sdes
875238106Sdes#ifndef HAVE_INET_PTON
876238106Sdes#define inet_pton inet_pton_unbound
877238106Sdesint inet_pton(int af, const char* src, void* dst);
878238106Sdes#endif /* HAVE_INET_PTON */
879238106Sdes
880238106Sdes
881238106Sdes#ifndef HAVE_INET_NTOP
882238106Sdes#define inet_ntop inet_ntop_unbound
883238106Sdesconst char *inet_ntop(int af, const void *src, char *dst, size_t size);
884238106Sdes#endif
885238106Sdes
886238106Sdes
887238106Sdes#ifndef HAVE_INET_ATON
888238106Sdes#define inet_aton inet_aton_unbound
889238106Sdesint inet_aton(const char *cp, struct in_addr *addr);
890238106Sdes#endif
891238106Sdes
892238106Sdes
893238106Sdes#ifndef HAVE_MEMMOVE
894238106Sdes#define memmove memmove_unbound
895238106Sdesvoid *memmove(void *dest, const void *src, size_t n);
896238106Sdes#endif
897238106Sdes
898238106Sdes
899269257Sdes#ifndef HAVE_STRLCAT
900269257Sdes#define strlcat strlcat_unbound
901269257Sdessize_t strlcat(char *dst, const char *src, size_t siz);
902269257Sdes#endif
903269257Sdes
904269257Sdes
905238106Sdes#ifndef HAVE_STRLCPY
906238106Sdes#define strlcpy strlcpy_unbound
907238106Sdessize_t strlcpy(char *dst, const char *src, size_t siz);
908238106Sdes#endif
909238106Sdes
910238106Sdes
911238106Sdes#ifndef HAVE_GMTIME_R
912238106Sdes#define gmtime_r gmtime_r_unbound
913238106Sdesstruct tm *gmtime_r(const time_t *timep, struct tm *result);
914238106Sdes#endif
915238106Sdes
916238106Sdes
917291767Sdes#ifndef HAVE_REALLOCARRAY
918291767Sdes#define reallocarray reallocarrayunbound
919291767Sdesvoid* reallocarray(void *ptr, size_t nmemb, size_t size);
920291767Sdes#endif
921291767Sdes
922291767Sdes
923269257Sdes#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
924238106Sdes#define sleep(x) Sleep((x)*1000) /* on win32 */
925238106Sdes#endif /* HAVE_SLEEP */
926238106Sdes
927238106Sdes
928238106Sdes#ifndef HAVE_USLEEP
929238106Sdes#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
930238106Sdes#endif /* HAVE_USLEEP */
931238106Sdes
932238106Sdes
933238106Sdes#ifndef HAVE_RANDOM
934238106Sdes#define random rand /* on win32, for tests only (bad random) */
935238106Sdes#endif /* HAVE_RANDOM */
936238106Sdes
937238106Sdes
938238106Sdes#ifndef HAVE_SRANDOM
939238106Sdes#define srandom(x) srand(x) /* on win32, for tests only (bad random) */
940238106Sdes#endif /* HAVE_SRANDOM */
941238106Sdes
942238106Sdes
943238106Sdes/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
944238106Sdes#ifdef HAVE_WINSOCK2_H
945238106Sdes#define FD_SET_T (u_int)
946238106Sdes#else
947238106Sdes#define FD_SET_T 
948238106Sdes#endif
949238106Sdes
950238106Sdes
951238106Sdes#ifndef IPV6_MIN_MTU
952238106Sdes#define IPV6_MIN_MTU 1280
953238106Sdes#endif /* IPV6_MIN_MTU */
954238106Sdes
955238106Sdes
956238106Sdes#ifdef MEMCMP_IS_BROKEN
957238106Sdes#include "compat/memcmp.h"
958238106Sdes#define memcmp memcmp_unbound
959238106Sdesint memcmp(const void *x, const void *y, size_t n);
960238106Sdes#endif
961238106Sdes
962238106Sdes
963238106Sdes
964238106Sdes#ifndef HAVE_CTIME_R
965238106Sdes#define ctime_r unbound_ctime_r
966238106Sdeschar *ctime_r(const time_t *timep, char *buf);
967238106Sdes#endif
968238106Sdes
969294190Sdes#ifndef HAVE_ISBLANK
970294190Sdes#define isblank unbound_isblank
971294190Sdesint isblank(int c);
972294190Sdes#endif
973294190Sdes
974238106Sdes#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
975238106Sdes#define strptime unbound_strptime
976238106Sdesstruct tm;
977238106Sdeschar *strptime(const char *s, const char *format, struct tm *tm);
978238106Sdes#endif
979238106Sdes
980285206Sdes#ifdef HAVE_LIBRESSL
981285206Sdes#  if !HAVE_DECL_STRLCPY
982285206Sdessize_t strlcpy(char *dst, const char *src, size_t siz);
983285206Sdes#  endif
984285206Sdes#  if !HAVE_DECL_STRLCAT
985285206Sdessize_t strlcat(char *dst, const char *src, size_t siz);
986285206Sdes#  endif
987285206Sdes#  if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
988285206Sdesuint32_t arc4random(void);
989285206Sdes#  endif
990285206Sdes#  if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
991285206Sdesuint32_t arc4random_uniform(uint32_t upper_bound);
992285206Sdes#  endif
993291767Sdes#  if !HAVE_DECL_REALLOCARRAY
994291767Sdesvoid *reallocarray(void *ptr, size_t nmemb, size_t size);
995291767Sdes#  endif
996285206Sdes#endif /* HAVE_LIBRESSL */
997285206Sdes#ifndef HAVE_ARC4RANDOM
998285206Sdesvoid explicit_bzero(void* buf, size_t len);
999285206Sdesint getentropy(void* buf, size_t len);
1000285206Sdesuint32_t arc4random(void);
1001285206Sdesvoid arc4random_buf(void* buf, size_t n);
1002285206Sdesvoid _ARC4_LOCK(void);
1003285206Sdesvoid _ARC4_UNLOCK(void);
1004285206Sdes#endif
1005285206Sdes#ifndef HAVE_ARC4RANDOM_UNIFORM
1006285206Sdesuint32_t arc4random_uniform(uint32_t upper_bound);
1007285206Sdes#endif
1008285206Sdes#ifdef COMPAT_SHA512
1009285206Sdes#ifndef SHA512_DIGEST_LENGTH
1010285206Sdes#define SHA512_BLOCK_LENGTH		128
1011285206Sdes#define SHA512_DIGEST_LENGTH		64
1012285206Sdes#define SHA512_DIGEST_STRING_LENGTH	(SHA512_DIGEST_LENGTH * 2 + 1)
1013285206Sdestypedef struct _SHA512_CTX {
1014285206Sdes	uint64_t	state[8];
1015285206Sdes	uint64_t	bitcount[2];
1016285206Sdes	uint8_t	buffer[SHA512_BLOCK_LENGTH];
1017285206Sdes} SHA512_CTX;
1018285206Sdes#endif /* SHA512_DIGEST_LENGTH */
1019285206Sdesvoid SHA512_Init(SHA512_CTX*);
1020285206Sdesvoid SHA512_Update(SHA512_CTX*, void*, size_t);
1021285206Sdesvoid SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1022285206Sdesunsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1023285206Sdes#endif /* COMPAT_SHA512 */
1024285206Sdes
1025285206Sdes
1026285206Sdes
1027238106Sdes#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))
1028238106Sdes   /* using version of libevent that is not threadsafe. */
1029238106Sdes#  define LIBEVENT_SIGNAL_PROBLEM 1
1030238106Sdes#endif
1031238106Sdes
1032238106Sdes#ifndef CHECKED_INET6
1033238106Sdes#  define CHECKED_INET6
1034238106Sdes#  ifdef AF_INET6
1035238106Sdes#    define INET6
1036238106Sdes#  else
1037238106Sdes#    define AF_INET6        28
1038238106Sdes#  endif
1039238106Sdes#endif /* CHECKED_INET6 */
1040238106Sdes
1041238106Sdes#ifndef HAVE_GETADDRINFO
1042238106Sdesstruct sockaddr_storage;
1043238106Sdes#include "compat/fake-rfc2553.h"
1044238106Sdes#endif
1045238106Sdes
1046238106Sdes#ifdef UNBOUND_ALLOC_STATS
1047238106Sdes#  define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1048238106Sdes#  define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1049238106Sdes#  define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1050238106Sdes#  define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1051238106Sdesvoid *unbound_stat_malloc(size_t size);
1052238106Sdesvoid *unbound_stat_calloc(size_t nmemb, size_t size);
1053238106Sdesvoid unbound_stat_free(void *ptr);
1054238106Sdesvoid *unbound_stat_realloc(void *ptr, size_t size);
1055238106Sdesvoid *unbound_stat_malloc_log(size_t size, const char* file, int line,
1056238106Sdes	const char* func);
1057238106Sdesvoid *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1058238106Sdes	int line, const char* func);
1059238106Sdesvoid unbound_stat_free_log(void *ptr, const char* file, int line,
1060238106Sdes	const char* func);
1061238106Sdesvoid *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1062238106Sdes	int line, const char* func);
1063238106Sdes#elif defined(UNBOUND_ALLOC_LITE)
1064238106Sdes#  include "util/alloc.h"
1065238106Sdes#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1066238106Sdes
1067238106Sdes/** default port for DNS traffic. */
1068238106Sdes#define UNBOUND_DNS_PORT 53
1069238106Sdes/** default port for unbound control traffic, registered port with IANA,
1070238106Sdes    ub-dns-control  8953/tcp    unbound dns nameserver control */
1071238106Sdes#define UNBOUND_CONTROL_PORT 8953
1072238106Sdes/** the version of unbound-control that this software implements */
1073238106Sdes#define UNBOUND_CONTROL_VERSION 1
1074238106Sdes
1075238106Sdes
1076