1255581Sdes/* config.h.  Generated from config.h.in by configure.  */
2255581Sdes/* config.h.in.  Generated from configure.ac by autoheader.  */
3255581Sdes
4255581Sdes/* Directory to chroot to */
5255581Sdes#define CHROOT_DIR "/var/unbound"
6255581Sdes
7285206Sdes/* Do sha512 definitions in config.h */
8285206Sdes/* #undef COMPAT_SHA512 */
9285206Sdes
10255581Sdes/* Pathname to the Unbound configuration file */
11255840Sdes#define CONFIGFILE "/var/unbound/unbound.conf"
12255581Sdes
13255581Sdes/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
14255581Sdes   */
15255581Sdes/* #undef DARWIN_BROKEN_SETREUID */
16255581Sdes
17255581Sdes/* Whether daemon is deprecated */
18255581Sdes/* #undef DEPRECATED_DAEMON */
19255581Sdes
20285206Sdes/* default dnstap socket path */
21285206Sdes/* #undef DNSTAP_SOCKET_PATH */
22285206Sdes
23255581Sdes/* Define if you want to use debug lock checking (slow). */
24255581Sdes/* #undef ENABLE_LOCK_CHECKS */
25255581Sdes
26255581Sdes/* Define this if you enabled-allsymbols from libunbound to link binaries to
27255581Sdes   it for smaller install size, but the libunbound export table is polluted by
28255581Sdes   internal symbols */
29255581Sdes/* #undef EXPORT_ALL_SYMBOLS */
30255581Sdes
31285206Sdes/* Define to 1 if you have the `arc4random' function. */
32285206Sdes#define HAVE_ARC4RANDOM 1
33285206Sdes
34285206Sdes/* Define to 1 if you have the `arc4random_uniform' function. */
35285206Sdes#define HAVE_ARC4RANDOM_UNIFORM 1
36285206Sdes
37255581Sdes/* Define to 1 if you have the <arpa/inet.h> header file. */
38255581Sdes#define HAVE_ARPA_INET_H 1
39255581Sdes
40255581Sdes/* Whether the C compiler accepts the "format" attribute */
41255581Sdes#define HAVE_ATTR_FORMAT 1
42255581Sdes
43255581Sdes/* Whether the C compiler accepts the "unused" attribute */
44255581Sdes#define HAVE_ATTR_UNUSED 1
45255581Sdes
46285206Sdes/* Define to 1 if you have the `chown' function. */
47255581Sdes#define HAVE_CHOWN 1
48255581Sdes
49255581Sdes/* Define to 1 if you have the `chroot' function. */
50255581Sdes#define HAVE_CHROOT 1
51255581Sdes
52255581Sdes/* Define to 1 if you have the `ctime_r' function. */
53255581Sdes#define HAVE_CTIME_R 1
54255581Sdes
55255581Sdes/* Define to 1 if you have the `daemon' function. */
56255581Sdes#define HAVE_DAEMON 1
57255581Sdes
58285206Sdes/* Define to 1 if you have the declaration of `arc4random', and to 0 if you
59285206Sdes   don't. */
60285206Sdes/* #undef HAVE_DECL_ARC4RANDOM */
61285206Sdes
62285206Sdes/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
63285206Sdes   if you don't. */
64285206Sdes/* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */
65285206Sdes
66255581Sdes/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
67255581Sdes   don't. */
68255581Sdes#define HAVE_DECL_NID_SECP384R1 1
69255581Sdes
70255581Sdes/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
71255581Sdes   if you don't. */
72255581Sdes#define HAVE_DECL_NID_X9_62_PRIME256V1 1
73255581Sdes
74291767Sdes/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
75291767Sdes   don't. */
76291767Sdes/* #undef HAVE_DECL_REALLOCARRAY */
77291767Sdes
78255581Sdes/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
79255581Sdes   if you don't. */
80255581Sdes#define HAVE_DECL_SK_SSL_COMP_POP_FREE 1
81255581Sdes
82255581Sdes/* Define to 1 if you have the declaration of
83255581Sdes   `SSL_COMP_get_compression_methods', and to 0 if you don't. */
84255581Sdes#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1
85255581Sdes
86291767Sdes/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
87291767Sdes   0 if you don't. */
88291767Sdes#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 0
89291767Sdes
90285206Sdes/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
91285206Sdes   don't. */
92285206Sdes/* #undef HAVE_DECL_STRLCAT */
93285206Sdes
94285206Sdes/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
95285206Sdes   don't. */
96285206Sdes/* #undef HAVE_DECL_STRLCPY */
97285206Sdes
98294190Sdes/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
99294190Sdes   you don't. */
100294190Sdes#define HAVE_DECL_XML_STOPPARSER 1
101294190Sdes
102255581Sdes/* Define to 1 if you have the <dlfcn.h> header file. */
103255581Sdes#define HAVE_DLFCN_H 1
104255581Sdes
105285206Sdes/* Define to 1 if you have the <endian.h> header file. */
106285206Sdes/* #undef HAVE_ENDIAN_H */
107285206Sdes
108269257Sdes/* Define to 1 if you have the `endprotoent' function. */
109269257Sdes#define HAVE_ENDPROTOENT 1
110269257Sdes
111269257Sdes/* Define to 1 if you have the `endservent' function. */
112269257Sdes#define HAVE_ENDSERVENT 1
113269257Sdes
114255581Sdes/* Define to 1 if you have the `event_base_free' function. */
115255581Sdes/* #undef HAVE_EVENT_BASE_FREE */
116255581Sdes
117255581Sdes/* Define to 1 if you have the `event_base_get_method' function. */
118255581Sdes/* #undef HAVE_EVENT_BASE_GET_METHOD */
119255581Sdes
120255581Sdes/* Define to 1 if you have the `event_base_new' function. */
121255581Sdes/* #undef HAVE_EVENT_BASE_NEW */
122255581Sdes
123255581Sdes/* Define to 1 if you have the `event_base_once' function. */
124255581Sdes/* #undef HAVE_EVENT_BASE_ONCE */
125255581Sdes
126255581Sdes/* Define to 1 if you have the <event.h> header file. */
127255581Sdes/* #undef HAVE_EVENT_H */
128255581Sdes
129255581Sdes/* Define to 1 if you have the `EVP_sha1' function. */
130255581Sdes#define HAVE_EVP_SHA1 1
131255581Sdes
132255581Sdes/* Define to 1 if you have the `EVP_sha256' function. */
133255581Sdes#define HAVE_EVP_SHA256 1
134255581Sdes
135255581Sdes/* Define to 1 if you have the `EVP_sha512' function. */
136255581Sdes#define HAVE_EVP_SHA512 1
137255581Sdes
138255581Sdes/* Define to 1 if you have the `ev_default_loop' function. */
139255581Sdes/* #undef HAVE_EV_DEFAULT_LOOP */
140255581Sdes
141255581Sdes/* Define to 1 if you have the `ev_loop' function. */
142255581Sdes/* #undef HAVE_EV_LOOP */
143255581Sdes
144255581Sdes/* Define to 1 if you have the <expat.h> header file. */
145255581Sdes#define HAVE_EXPAT_H 1
146255581Sdes
147255581Sdes/* Define to 1 if you have the `fcntl' function. */
148255581Sdes#define HAVE_FCNTL 1
149255581Sdes
150255581Sdes/* Define to 1 if you have the `FIPS_mode' function. */
151255581Sdes#define HAVE_FIPS_MODE 1
152255581Sdes
153255581Sdes/* Define to 1 if you have the `fork' function. */
154255581Sdes#define HAVE_FORK 1
155255581Sdes
156255581Sdes/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
157255581Sdes#define HAVE_FSEEKO 1
158255581Sdes
159294190Sdes/* Define to 1 if you have the `fsync' function. */
160294190Sdes#define HAVE_FSYNC 1
161294190Sdes
162255581Sdes/* Whether getaddrinfo is available */
163255581Sdes#define HAVE_GETADDRINFO 1
164255581Sdes
165285206Sdes/* Define to 1 if you have the `getauxval' function. */
166285206Sdes/* #undef HAVE_GETAUXVAL */
167285206Sdes
168285206Sdes/* Define to 1 if you have the `getentropy' function. */
169285206Sdes/* #undef HAVE_GETENTROPY */
170285206Sdes
171255581Sdes/* Define to 1 if you have the <getopt.h> header file. */
172255581Sdes#define HAVE_GETOPT_H 1
173255581Sdes
174255581Sdes/* Define to 1 if you have the `getpwnam' function. */
175255581Sdes#define HAVE_GETPWNAM 1
176255581Sdes
177255581Sdes/* Define to 1 if you have the `getrlimit' function. */
178255581Sdes#define HAVE_GETRLIMIT 1
179255581Sdes
180255581Sdes/* Define to 1 if you have the `glob' function. */
181255581Sdes#define HAVE_GLOB 1
182255581Sdes
183255581Sdes/* Define to 1 if you have the <glob.h> header file. */
184255581Sdes#define HAVE_GLOB_H 1
185255581Sdes
186255581Sdes/* Define to 1 if you have the `gmtime_r' function. */
187255581Sdes#define HAVE_GMTIME_R 1
188255581Sdes
189255581Sdes/* Define to 1 if you have the <grp.h> header file. */
190255581Sdes#define HAVE_GRP_H 1
191255581Sdes
192255581Sdes/* If you have HMAC_CTX_init */
193255581Sdes#define HAVE_HMAC_CTX_INIT 1
194255581Sdes
195255581Sdes/* Define to 1 if you have the `inet_aton' function. */
196255581Sdes#define HAVE_INET_ATON 1
197255581Sdes
198255581Sdes/* Define to 1 if you have the `inet_ntop' function. */
199255581Sdes#define HAVE_INET_NTOP 1
200255581Sdes
201255581Sdes/* Define to 1 if you have the `inet_pton' function. */
202255581Sdes#define HAVE_INET_PTON 1
203255581Sdes
204255581Sdes/* Define to 1 if you have the `initgroups' function. */
205255581Sdes#define HAVE_INITGROUPS 1
206255581Sdes
207255581Sdes/* Define to 1 if you have the <inttypes.h> header file. */
208255581Sdes#define HAVE_INTTYPES_H 1
209255581Sdes
210255581Sdes/* if the function 'ioctlsocket' is available */
211255581Sdes/* #undef HAVE_IOCTLSOCKET */
212255581Sdes
213255581Sdes/* Define to 1 if you have the <iphlpapi.h> header file. */
214255581Sdes/* #undef HAVE_IPHLPAPI_H */
215255581Sdes
216294190Sdes/* Define to 1 if you have the `isblank' function. */
217294190Sdes#define HAVE_ISBLANK 1
218294190Sdes
219255581Sdes/* Define to 1 if you have the `kill' function. */
220255581Sdes#define HAVE_KILL 1
221255581Sdes
222285206Sdes/* Define if we have LibreSSL */
223285206Sdes/* #undef HAVE_LIBRESSL */
224285206Sdes
225255581Sdes/* Define to 1 if you have the `localtime_r' function. */
226255581Sdes#define HAVE_LOCALTIME_R 1
227255581Sdes
228255581Sdes/* Define to 1 if you have the <login_cap.h> header file. */
229255581Sdes#define HAVE_LOGIN_CAP_H 1
230255581Sdes
231255581Sdes/* If have GNU libc compatible malloc */
232255581Sdes#define HAVE_MALLOC 1
233255581Sdes
234255581Sdes/* Define to 1 if you have the `memmove' function. */
235255581Sdes#define HAVE_MEMMOVE 1
236255581Sdes
237255581Sdes/* Define to 1 if you have the <memory.h> header file. */
238255581Sdes#define HAVE_MEMORY_H 1
239255581Sdes
240255581Sdes/* Define to 1 if you have the <netdb.h> header file. */
241255581Sdes#define HAVE_NETDB_H 1
242255581Sdes
243255581Sdes/* Define to 1 if you have the <netinet/in.h> header file. */
244255581Sdes#define HAVE_NETINET_IN_H 1
245255581Sdes
246294190Sdes/* Use libnettle for crypto */
247294190Sdes/* #undef HAVE_NETTLE */
248294190Sdes
249255581Sdes/* Use libnss for crypto */
250255581Sdes/* #undef HAVE_NSS */
251255581Sdes
252255581Sdes/* Define to 1 if you have the `OPENSSL_config' function. */
253255581Sdes#define HAVE_OPENSSL_CONFIG 1
254255581Sdes
255255581Sdes/* Define to 1 if you have the <openssl/conf.h> header file. */
256255581Sdes#define HAVE_OPENSSL_CONF_H 1
257255581Sdes
258255581Sdes/* Define to 1 if you have the <openssl/engine.h> header file. */
259255581Sdes#define HAVE_OPENSSL_ENGINE_H 1
260255581Sdes
261255581Sdes/* Define to 1 if you have the <openssl/err.h> header file. */
262255581Sdes#define HAVE_OPENSSL_ERR_H 1
263255581Sdes
264255581Sdes/* Define to 1 if you have the <openssl/rand.h> header file. */
265255581Sdes#define HAVE_OPENSSL_RAND_H 1
266255581Sdes
267255581Sdes/* Define to 1 if you have the <openssl/ssl.h> header file. */
268255581Sdes#define HAVE_OPENSSL_SSL_H 1
269255581Sdes
270255581Sdes/* Define if you have POSIX threads libraries and header files. */
271255581Sdes#define HAVE_PTHREAD 1
272255581Sdes
273269257Sdes/* Have PTHREAD_PRIO_INHERIT. */
274269257Sdes#define HAVE_PTHREAD_PRIO_INHERIT 1
275269257Sdes
276255581Sdes/* Define to 1 if the system has the type `pthread_rwlock_t'. */
277255581Sdes#define HAVE_PTHREAD_RWLOCK_T 1
278255581Sdes
279255581Sdes/* Define to 1 if the system has the type `pthread_spinlock_t'. */
280255581Sdes#define HAVE_PTHREAD_SPINLOCK_T 1
281255581Sdes
282255581Sdes/* Define to 1 if you have the <pwd.h> header file. */
283255581Sdes#define HAVE_PWD_H 1
284255581Sdes
285255581Sdes/* Define if you have Python libraries and header files. */
286255581Sdes/* #undef HAVE_PYTHON */
287255581Sdes
288255581Sdes/* Define to 1 if you have the `random' function. */
289255581Sdes#define HAVE_RANDOM 1
290255581Sdes
291291767Sdes/* Define to 1 if you have the `reallocarray' function. */
292291767Sdes/* #undef HAVE_REALLOCARRAY */
293291767Sdes
294255581Sdes/* Define to 1 if you have the `recvmsg' function. */
295255581Sdes#define HAVE_RECVMSG 1
296255581Sdes
297255581Sdes/* Define to 1 if you have the `sbrk' function. */
298269257Sdes/* #undef HAVE_SBRK */
299255581Sdes
300255581Sdes/* Define to 1 if you have the `sendmsg' function. */
301255581Sdes#define HAVE_SENDMSG 1
302255581Sdes
303255581Sdes/* Define to 1 if you have the `setregid' function. */
304255581Sdes/* #undef HAVE_SETREGID */
305255581Sdes
306255581Sdes/* Define to 1 if you have the `setresgid' function. */
307255581Sdes#define HAVE_SETRESGID 1
308255581Sdes
309255581Sdes/* Define to 1 if you have the `setresuid' function. */
310255581Sdes#define HAVE_SETRESUID 1
311255581Sdes
312255581Sdes/* Define to 1 if you have the `setreuid' function. */
313255581Sdes/* #undef HAVE_SETREUID */
314255581Sdes
315255581Sdes/* Define to 1 if you have the `setrlimit' function. */
316255581Sdes#define HAVE_SETRLIMIT 1
317255581Sdes
318255581Sdes/* Define to 1 if you have the `setsid' function. */
319255581Sdes#define HAVE_SETSID 1
320255581Sdes
321255581Sdes/* Define to 1 if you have the `setusercontext' function. */
322255581Sdes#define HAVE_SETUSERCONTEXT 1
323255581Sdes
324285206Sdes/* Define to 1 if you have the `SHA512_Update' function. */
325285206Sdes/* #undef HAVE_SHA512_UPDATE */
326285206Sdes
327255581Sdes/* Define to 1 if you have the `sigprocmask' function. */
328255581Sdes#define HAVE_SIGPROCMASK 1
329255581Sdes
330255581Sdes/* Define to 1 if you have the `sleep' function. */
331255581Sdes#define HAVE_SLEEP 1
332255581Sdes
333255581Sdes/* Define to 1 if you have the `snprintf' function. */
334255581Sdes#define HAVE_SNPRINTF 1
335255581Sdes
336255581Sdes/* Define to 1 if you have the `socketpair' function. */
337255581Sdes#define HAVE_SOCKETPAIR 1
338255581Sdes
339255581Sdes/* Using Solaris threads */
340255581Sdes/* #undef HAVE_SOLARIS_THREADS */
341255581Sdes
342255581Sdes/* Define to 1 if you have the `srandom' function. */
343255581Sdes#define HAVE_SRANDOM 1
344255581Sdes
345255581Sdes/* Define if you have the SSL libraries installed. */
346255581Sdes#define HAVE_SSL /**/
347255581Sdes
348255581Sdes/* Define to 1 if you have the <stdarg.h> header file. */
349255581Sdes#define HAVE_STDARG_H 1
350255581Sdes
351255581Sdes/* Define to 1 if you have the <stdbool.h> header file. */
352255581Sdes#define HAVE_STDBOOL_H 1
353255581Sdes
354255581Sdes/* Define to 1 if you have the <stdint.h> header file. */
355255581Sdes#define HAVE_STDINT_H 1
356255581Sdes
357255581Sdes/* Define to 1 if you have the <stdlib.h> header file. */
358255581Sdes#define HAVE_STDLIB_H 1
359255581Sdes
360255581Sdes/* Define to 1 if you have the `strftime' function. */
361255581Sdes#define HAVE_STRFTIME 1
362255581Sdes
363255581Sdes/* Define to 1 if you have the <strings.h> header file. */
364255581Sdes#define HAVE_STRINGS_H 1
365255581Sdes
366255581Sdes/* Define to 1 if you have the <string.h> header file. */
367255581Sdes#define HAVE_STRING_H 1
368255581Sdes
369269257Sdes/* Define to 1 if you have the `strlcat' function. */
370269257Sdes#define HAVE_STRLCAT 1
371269257Sdes
372255581Sdes/* Define to 1 if you have the `strlcpy' function. */
373255581Sdes#define HAVE_STRLCPY 1
374255581Sdes
375255581Sdes/* Define to 1 if you have the `strptime' function. */
376255581Sdes#define HAVE_STRPTIME 1
377255581Sdes
378255581Sdes/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
379255581Sdes/* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */
380255581Sdes
381285206Sdes/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
382285206Sdes#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
383285206Sdes
384255581Sdes/* Define if you have Swig libraries and header files. */
385255581Sdes/* #undef HAVE_SWIG */
386255581Sdes
387255581Sdes/* Define to 1 if you have the <syslog.h> header file. */
388255581Sdes#define HAVE_SYSLOG_H 1
389255581Sdes
390255581Sdes/* Define to 1 if you have the <sys/param.h> header file. */
391255581Sdes#define HAVE_SYS_PARAM_H 1
392255581Sdes
393255581Sdes/* Define to 1 if you have the <sys/resource.h> header file. */
394255581Sdes#define HAVE_SYS_RESOURCE_H 1
395255581Sdes
396285206Sdes/* Define to 1 if you have the <sys/sha2.h> header file. */
397285206Sdes/* #undef HAVE_SYS_SHA2_H */
398285206Sdes
399255581Sdes/* Define to 1 if you have the <sys/socket.h> header file. */
400255581Sdes#define HAVE_SYS_SOCKET_H 1
401255581Sdes
402255581Sdes/* Define to 1 if you have the <sys/stat.h> header file. */
403255581Sdes#define HAVE_SYS_STAT_H 1
404255581Sdes
405285206Sdes/* Define to 1 if you have the <sys/sysctl.h> header file. */
406285206Sdes/* #undef HAVE_SYS_SYSCTL_H */
407285206Sdes
408255581Sdes/* Define to 1 if you have the <sys/types.h> header file. */
409255581Sdes#define HAVE_SYS_TYPES_H 1
410255581Sdes
411255581Sdes/* Define to 1 if you have the <sys/uio.h> header file. */
412255581Sdes#define HAVE_SYS_UIO_H 1
413255581Sdes
414285206Sdes/* Define to 1 if you have the <sys/un.h> header file. */
415285206Sdes#define HAVE_SYS_UN_H 1
416285206Sdes
417255581Sdes/* Define to 1 if you have the <sys/wait.h> header file. */
418255581Sdes#define HAVE_SYS_WAIT_H 1
419255581Sdes
420255581Sdes/* Define to 1 if you have the <time.h> header file. */
421255581Sdes#define HAVE_TIME_H 1
422255581Sdes
423255581Sdes/* Define to 1 if you have the `tzset' function. */
424255581Sdes#define HAVE_TZSET 1
425255581Sdes
426255581Sdes/* Define to 1 if you have the <unistd.h> header file. */
427255581Sdes#define HAVE_UNISTD_H 1
428255581Sdes
429255581Sdes/* Define to 1 if you have the `usleep' function. */
430255581Sdes#define HAVE_USLEEP 1
431255581Sdes
432255581Sdes/* Define to 1 if you have the `vfork' function. */
433255581Sdes#define HAVE_VFORK 1
434255581Sdes
435255581Sdes/* Define to 1 if you have the <vfork.h> header file. */
436255581Sdes/* #undef HAVE_VFORK_H */
437255581Sdes
438255581Sdes/* Define to 1 if you have the <windows.h> header file. */
439255581Sdes/* #undef HAVE_WINDOWS_H */
440255581Sdes
441255581Sdes/* Using Windows threads */
442255581Sdes/* #undef HAVE_WINDOWS_THREADS */
443255581Sdes
444255581Sdes/* Define to 1 if you have the <winsock2.h> header file. */
445255581Sdes/* #undef HAVE_WINSOCK2_H */
446255581Sdes
447255581Sdes/* Define to 1 if `fork' works. */
448255581Sdes#define HAVE_WORKING_FORK 1
449255581Sdes
450255581Sdes/* Define to 1 if `vfork' works. */
451255581Sdes#define HAVE_WORKING_VFORK 1
452255581Sdes
453255581Sdes/* Define to 1 if you have the `writev' function. */
454255581Sdes#define HAVE_WRITEV 1
455255581Sdes
456255581Sdes/* Define to 1 if you have the <ws2tcpip.h> header file. */
457255581Sdes/* #undef HAVE_WS2TCPIP_H */
458255581Sdes
459255581Sdes/* Define to 1 if you have the `_beginthreadex' function. */
460255581Sdes/* #undef HAVE__BEGINTHREADEX */
461255581Sdes
462255581Sdes/* if lex has yylex_destroy */
463255581Sdes#define LEX_HAS_YYLEX_DESTROY 1
464255581Sdes
465255581Sdes/* Define to the sub-directory in which libtool stores uninstalled libraries.
466255581Sdes   */
467255581Sdes#define LT_OBJDIR ".libs/"
468255581Sdes
469255581Sdes/* Define to the maximum message length to pass to syslog. */
470255581Sdes#define MAXSYSLOGMSGLEN 10240
471255581Sdes
472255581Sdes/* Define if memcmp() does not compare unsigned bytes */
473255581Sdes/* #undef MEMCMP_IS_BROKEN */
474255581Sdes
475255581Sdes/* Define if mkdir has one argument. */
476255581Sdes/* #undef MKDIR_HAS_ONE_ARG */
477255581Sdes
478255581Sdes/* Define if the network stack does not fully support nonblocking io (causes
479255581Sdes   lower performance). */
480255581Sdes/* #undef NONBLOCKING_IS_BROKEN */
481255581Sdes
482255581Sdes/* Put -D_ALL_SOURCE define in config.h */
483255581Sdes/* #undef OMITTED__D_ALL_SOURCE */
484255581Sdes
485255581Sdes/* Put -D_BSD_SOURCE define in config.h */
486255581Sdes/* #undef OMITTED__D_BSD_SOURCE */
487255581Sdes
488255581Sdes/* Put -D_GNU_SOURCE define in config.h */
489255581Sdes/* #undef OMITTED__D_GNU_SOURCE */
490255581Sdes
491255581Sdes/* Put -D_LARGEFILE_SOURCE=1 define in config.h */
492255581Sdes/* #undef OMITTED__D_LARGEFILE_SOURCE_1 */
493255581Sdes
494255581Sdes/* Put -D_POSIX_C_SOURCE=200112 define in config.h */
495255581Sdes/* #undef OMITTED__D_POSIX_C_SOURCE_200112 */
496255581Sdes
497255581Sdes/* Put -D_XOPEN_SOURCE=600 define in config.h */
498255581Sdes/* #undef OMITTED__D_XOPEN_SOURCE_600 */
499255581Sdes
500255581Sdes/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
501255581Sdes/* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */
502255581Sdes
503255581Sdes/* Put -D__EXTENSIONS__ define in config.h */
504255581Sdes/* #undef OMITTED__D__EXTENSIONS__ */
505255581Sdes
506255581Sdes/* Define to the address where bug reports for this package should be sent. */
507255581Sdes#define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl"
508255581Sdes
509255581Sdes/* Define to the full name of this package. */
510255581Sdes#define PACKAGE_NAME "unbound"
511255581Sdes
512255581Sdes/* Define to the full name and version of this package. */
513294190Sdes#define PACKAGE_STRING "unbound 1.5.7"
514255581Sdes
515255581Sdes/* Define to the one symbol short name of this package. */
516255581Sdes#define PACKAGE_TARNAME "unbound"
517255581Sdes
518255581Sdes/* Define to the home page for this package. */
519255581Sdes#define PACKAGE_URL ""
520255581Sdes
521255581Sdes/* Define to the version of this package. */
522294190Sdes#define PACKAGE_VERSION "1.5.7"
523255581Sdes
524255581Sdes/* default pidfile location */
525255581Sdes#define PIDFILE "/var/unbound/unbound.pid"
526255581Sdes
527255581Sdes/* Define to necessary symbol if this constant uses a non-standard name on
528255581Sdes   your system. */
529255581Sdes/* #undef PTHREAD_CREATE_JOINABLE */
530255581Sdes
531255581Sdes/* Define as the return type of signal handlers (`int' or `void'). */
532255581Sdes#define RETSIGTYPE void
533255581Sdes
534255581Sdes/* default rootkey location */
535255581Sdes#define ROOT_ANCHOR_FILE "/var/unbound/root.key"
536255581Sdes
537255581Sdes/* default rootcert location */
538255581Sdes#define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
539255581Sdes
540255581Sdes/* version number for resource files */
541294190Sdes#define RSRC_PACKAGE_VERSION 1,5,7,0
542255581Sdes
543255581Sdes/* Directory to chdir to */
544255581Sdes#define RUN_DIR "/var/unbound"
545255581Sdes
546255581Sdes/* Shared data */
547255581Sdes#define SHARE_DIR "/var/unbound"
548255581Sdes
549269257Sdes/* The size of `time_t', as computed by sizeof. */
550269257Sdes#define SIZEOF_TIME_T 8
551269257Sdes
552294190Sdes/* define if (v)snprintf does not return length needed, (but length used) */
553294190Sdes/* #undef SNPRINTF_RET_BROKEN */
554294190Sdes
555255581Sdes/* Define to 1 if you have the ANSI C header files. */
556255581Sdes#define STDC_HEADERS 1
557255581Sdes
558255581Sdes/* use default strptime. */
559255581Sdes#define STRPTIME_WORKS 1
560255581Sdes
561255581Sdes/* Use win32 resources and API */
562255581Sdes/* #undef UB_ON_WINDOWS */
563255581Sdes
564255581Sdes/* default username */
565255581Sdes#define UB_USERNAME "unbound"
566255581Sdes
567255581Sdes/* use to enable lightweight alloc assertions, for debug use */
568255581Sdes/* #undef UNBOUND_ALLOC_LITE */
569255581Sdes
570255581Sdes/* use malloc not regions, for debug use */
571255581Sdes/* #undef UNBOUND_ALLOC_NONREGIONAL */
572255581Sdes
573255581Sdes/* use statistics for allocs and frees, for debug use */
574255581Sdes/* #undef UNBOUND_ALLOC_STATS */
575255581Sdes
576255581Sdes/* define this to enable debug checks. */
577255581Sdes/* #undef UNBOUND_DEBUG */
578255581Sdes
579285206Sdes/* Define to 1 to enable dnstap support */
580285206Sdes/* #undef USE_DNSTAP */
581285206Sdes
582255581Sdes/* Define this to enable ECDSA support. */
583255581Sdes#define USE_ECDSA 1
584255581Sdes
585255581Sdes/* Define this to enable an EVP workaround for older openssl */
586255581Sdes/* #undef USE_ECDSA_EVP_WORKAROUND */
587255581Sdes
588255581Sdes/* Define this to enable GOST support. */
589294190Sdes#define USE_GOST 1
590255581Sdes
591255581Sdes/* Define if you want to use internal select based events */
592255581Sdes#define USE_MINI_EVENT 1
593255581Sdes
594255581Sdes/* Define this to enable SHA256 and SHA512 support. */
595255581Sdes#define USE_SHA2 1
596255581Sdes
597255581Sdes/* Enable extensions on AIX 3, Interix.  */
598255581Sdes#ifndef _ALL_SOURCE
599255581Sdes# define _ALL_SOURCE 1
600255581Sdes#endif
601255581Sdes/* Enable GNU extensions on systems that have them.  */
602255581Sdes#ifndef _GNU_SOURCE
603255581Sdes# define _GNU_SOURCE 1
604255581Sdes#endif
605255581Sdes/* Enable threading extensions on Solaris.  */
606255581Sdes#ifndef _POSIX_PTHREAD_SEMANTICS
607255581Sdes# define _POSIX_PTHREAD_SEMANTICS 1
608255581Sdes#endif
609255581Sdes/* Enable extensions on HP NonStop.  */
610255581Sdes#ifndef _TANDEM_SOURCE
611255581Sdes# define _TANDEM_SOURCE 1
612255581Sdes#endif
613255581Sdes/* Enable general extensions on Solaris.  */
614255581Sdes#ifndef __EXTENSIONS__
615255581Sdes# define __EXTENSIONS__ 1
616255581Sdes#endif
617255581Sdes
618255581Sdes
619255581Sdes/* Whether the windows socket API is used */
620255581Sdes/* #undef USE_WINSOCK */
621255581Sdes
622255581Sdes/* the version of the windows API enabled */
623255581Sdes#define WINVER 0x0502
624255581Sdes
625255581Sdes/* Define if you want Python module. */
626255581Sdes/* #undef WITH_PYTHONMODULE */
627255581Sdes
628255581Sdes/* Define if you want PyUnbound. */
629255581Sdes/* #undef WITH_PYUNBOUND */
630255581Sdes
631255581Sdes/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
632255581Sdes   `char[]'. */
633255581Sdes#define YYTEXT_POINTER 1
634255581Sdes
635255581Sdes/* Enable large inode numbers on Mac OS X 10.5.  */
636255581Sdes#ifndef _DARWIN_USE_64_BIT_INODE
637255581Sdes# define _DARWIN_USE_64_BIT_INODE 1
638255581Sdes#endif
639255581Sdes
640255581Sdes/* Number of bits in a file offset, on hosts where this is settable. */
641255581Sdes/* #undef _FILE_OFFSET_BITS */
642255581Sdes
643255581Sdes/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
644255581Sdes/* #undef _LARGEFILE_SOURCE */
645255581Sdes
646255581Sdes/* Define for large files, on AIX-style hosts. */
647255581Sdes/* #undef _LARGE_FILES */
648255581Sdes
649255581Sdes/* Define to 1 if on MINIX. */
650255581Sdes/* #undef _MINIX */
651255581Sdes
652269257Sdes/* Enable for compile on Minix */
653269257Sdes/* #undef _NETBSD_SOURCE */
654269257Sdes
655255581Sdes/* Define to 2 if the system does not provide POSIX.1 features except with
656255581Sdes   this defined. */
657255581Sdes/* #undef _POSIX_1_SOURCE */
658255581Sdes
659255581Sdes/* Define to 1 if you need to in order for `stat' and other things to work. */
660255581Sdes/* #undef _POSIX_SOURCE */
661255581Sdes
662255581Sdes/* Define to empty if `const' does not conform to ANSI C. */
663255581Sdes/* #undef const */
664255581Sdes
665255581Sdes/* Define to `int' if <sys/types.h> doesn't define. */
666255581Sdes/* #undef gid_t */
667255581Sdes
668255581Sdes/* in_addr_t */
669255581Sdes/* #undef in_addr_t */
670255581Sdes
671255581Sdes/* in_port_t */
672255581Sdes/* #undef in_port_t */
673255581Sdes
674255581Sdes/* Define to `__inline__' or `__inline' if that's what the C compiler
675255581Sdes   calls it, or to nothing if 'inline' is not supported under any name.  */
676255581Sdes#ifndef __cplusplus
677255581Sdes/* #undef inline */
678255581Sdes#endif
679255581Sdes
680255581Sdes/* Define to `short' if <sys/types.h> does not define. */
681255581Sdes/* #undef int16_t */
682255581Sdes
683255581Sdes/* Define to `int' if <sys/types.h> does not define. */
684255581Sdes/* #undef int32_t */
685255581Sdes
686255581Sdes/* Define to `long long' if <sys/types.h> does not define. */
687255581Sdes/* #undef int64_t */
688255581Sdes
689255581Sdes/* Define to `signed char' if <sys/types.h> does not define. */
690255581Sdes/* #undef int8_t */
691255581Sdes
692255581Sdes/* Define if replacement function should be used. */
693255581Sdes/* #undef malloc */
694255581Sdes
695255581Sdes/* Define to `long int' if <sys/types.h> does not define. */
696255581Sdes/* #undef off_t */
697255581Sdes
698255581Sdes/* Define to `int' if <sys/types.h> does not define. */
699255581Sdes/* #undef pid_t */
700255581Sdes
701255581Sdes/* Define to 'int' if not defined */
702255581Sdes/* #undef rlim_t */
703255581Sdes
704255581Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */
705255581Sdes/* #undef size_t */
706255581Sdes
707255581Sdes/* Define to 'int' if not defined */
708255581Sdes/* #undef socklen_t */
709255581Sdes
710255581Sdes/* Define to `int' if <sys/types.h> does not define. */
711255581Sdes/* #undef ssize_t */
712255581Sdes
713255581Sdes/* Define to 'unsigned char if not defined */
714255581Sdes/* #undef u_char */
715255581Sdes
716255581Sdes/* Define to `int' if <sys/types.h> doesn't define. */
717255581Sdes/* #undef uid_t */
718255581Sdes
719255581Sdes/* Define to `unsigned short' if <sys/types.h> does not define. */
720255581Sdes/* #undef uint16_t */
721255581Sdes
722255581Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */
723255581Sdes/* #undef uint32_t */
724255581Sdes
725255581Sdes/* Define to `unsigned long long' if <sys/types.h> does not define. */
726255581Sdes/* #undef uint64_t */
727255581Sdes
728255581Sdes/* Define to `unsigned char' if <sys/types.h> does not define. */
729255581Sdes/* #undef uint8_t */
730255581Sdes
731255581Sdes/* Define as `fork' if `vfork' does not work. */
732255581Sdes/* #undef vfork */
733255581Sdes
734255581Sdes#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
735255581Sdes#define _GNU_SOURCE 1
736255581Sdes#endif
737255581Sdes
738255581Sdes#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
739255581Sdes#define _BSD_SOURCE 1
740255581Sdes#endif
741255581Sdes
742255581Sdes#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
743255581Sdes#define __EXTENSIONS__ 1
744255581Sdes#endif
745255581Sdes
746255581Sdes#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
747255581Sdes#define _POSIX_C_SOURCE 200112
748255581Sdes#endif
749255581Sdes
750255581Sdes#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
751255581Sdes#define _XOPEN_SOURCE 600
752255581Sdes#endif
753255581Sdes
754255581Sdes#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
755255581Sdes#define _XOPEN_SOURCE_EXTENDED 1
756255581Sdes#endif
757255581Sdes
758255581Sdes#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
759255581Sdes#define _ALL_SOURCE 1
760255581Sdes#endif
761255581Sdes
762255581Sdes#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
763255581Sdes#define _LARGEFILE_SOURCE 1
764255581Sdes#endif
765255581Sdes
766255581Sdes
767255581Sdes
768255581Sdes
769255581Sdes#ifndef UNBOUND_DEBUG
770255581Sdes#  define NDEBUG
771255581Sdes#endif
772255581Sdes
773269257Sdes/** Use small-ldns codebase */
774269257Sdes#define USE_SLDNS 1
775269257Sdes#ifdef HAVE_SSL
776269257Sdes#  define LDNS_BUILD_CONFIG_HAVE_SSL 1
777269257Sdes#endif
778269257Sdes
779255581Sdes#include <stdio.h>
780255581Sdes#include <string.h>
781255581Sdes#include <unistd.h>
782255581Sdes#include <assert.h>
783255581Sdes
784255581Sdes#if STDC_HEADERS
785255581Sdes#include <stdlib.h>
786255581Sdes#include <stddef.h>
787255581Sdes#endif
788255581Sdes
789269257Sdes#ifdef HAVE_STDARG_H
790269257Sdes#include <stdarg.h>
791269257Sdes#endif
792269257Sdes
793255581Sdes#ifdef HAVE_STDINT_H
794255581Sdes#include <stdint.h>
795255581Sdes#endif
796255581Sdes
797255581Sdes#include <errno.h>
798255581Sdes
799255581Sdes#if HAVE_SYS_PARAM_H
800255581Sdes#include <sys/param.h>
801255581Sdes#endif
802255581Sdes
803255581Sdes#ifdef HAVE_SYS_SOCKET_H
804255581Sdes#include <sys/socket.h>
805255581Sdes#endif
806255581Sdes
807255581Sdes#ifdef HAVE_SYS_UIO_H
808255581Sdes#include <sys/uio.h>
809255581Sdes#endif
810255581Sdes
811255581Sdes#ifdef HAVE_NETINET_IN_H
812255581Sdes#include <netinet/in.h>
813255581Sdes#endif
814255581Sdes
815255581Sdes#ifdef HAVE_ARPA_INET_H
816255581Sdes#include <arpa/inet.h>
817255581Sdes#endif
818255581Sdes
819255581Sdes#ifdef HAVE_WINSOCK2_H
820255581Sdes#include <winsock2.h>
821255581Sdes#endif
822255581Sdes
823255581Sdes#ifdef HAVE_WS2TCPIP_H
824255581Sdes#include <ws2tcpip.h>
825255581Sdes#endif
826255581Sdes
827269257Sdes#ifndef USE_WINSOCK
828269257Sdes#define ARG_LL "%ll"
829269257Sdes#else
830269257Sdes#define ARG_LL "%I64"
831269257Sdes#endif
832255581Sdes
833285206Sdes#ifndef AF_LOCAL
834285206Sdes#define AF_LOCAL AF_UNIX
835285206Sdes#endif
836269257Sdes
837285206Sdes
838255581Sdes
839255581Sdes#ifdef HAVE_ATTR_FORMAT
840255581Sdes#  define ATTR_FORMAT(archetype, string_index, first_to_check) \
841255581Sdes    __attribute__ ((format (archetype, string_index, first_to_check)))
842255581Sdes#else /* !HAVE_ATTR_FORMAT */
843255581Sdes#  define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
844255581Sdes#endif /* !HAVE_ATTR_FORMAT */
845255581Sdes
846255581Sdes
847255581Sdes#if defined(DOXYGEN)
848255581Sdes#  define ATTR_UNUSED(x)  x
849255581Sdes#elif defined(__cplusplus)
850255581Sdes#  define ATTR_UNUSED(x)
851255581Sdes#elif defined(HAVE_ATTR_UNUSED)
852255581Sdes#  define ATTR_UNUSED(x)  x __attribute__((unused))
853255581Sdes#else /* !HAVE_ATTR_UNUSED */
854255581Sdes#  define ATTR_UNUSED(x)  x
855255581Sdes#endif /* !HAVE_ATTR_UNUSED */
856255581Sdes
857255581Sdes
858255581Sdes#ifndef HAVE_FSEEKO
859255581Sdes#define fseeko fseek
860255581Sdes#define ftello ftell
861255581Sdes#endif /* HAVE_FSEEKO */
862255581Sdes
863255581Sdes
864255581Sdes#ifndef MAXHOSTNAMELEN
865255581Sdes#define MAXHOSTNAMELEN 256
866255581Sdes#endif
867255581Sdes
868294190Sdes#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
869255581Sdes#define snprintf snprintf_unbound
870255581Sdes#define vsnprintf vsnprintf_unbound
871255581Sdes#include <stdarg.h>
872255581Sdesint snprintf (char *str, size_t count, const char *fmt, ...);
873255581Sdesint vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
874294190Sdes#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
875255581Sdes
876255581Sdes#ifndef HAVE_INET_PTON
877255581Sdes#define inet_pton inet_pton_unbound
878255581Sdesint inet_pton(int af, const char* src, void* dst);
879255581Sdes#endif /* HAVE_INET_PTON */
880255581Sdes
881255581Sdes
882255581Sdes#ifndef HAVE_INET_NTOP
883255581Sdes#define inet_ntop inet_ntop_unbound
884255581Sdesconst char *inet_ntop(int af, const void *src, char *dst, size_t size);
885255581Sdes#endif
886255581Sdes
887255581Sdes
888255581Sdes#ifndef HAVE_INET_ATON
889255581Sdes#define inet_aton inet_aton_unbound
890255581Sdesint inet_aton(const char *cp, struct in_addr *addr);
891255581Sdes#endif
892255581Sdes
893255581Sdes
894255581Sdes#ifndef HAVE_MEMMOVE
895255581Sdes#define memmove memmove_unbound
896255581Sdesvoid *memmove(void *dest, const void *src, size_t n);
897255581Sdes#endif
898255581Sdes
899255581Sdes
900269257Sdes#ifndef HAVE_STRLCAT
901269257Sdes#define strlcat strlcat_unbound
902269257Sdessize_t strlcat(char *dst, const char *src, size_t siz);
903269257Sdes#endif
904269257Sdes
905269257Sdes
906255581Sdes#ifndef HAVE_STRLCPY
907255581Sdes#define strlcpy strlcpy_unbound
908255581Sdessize_t strlcpy(char *dst, const char *src, size_t siz);
909255581Sdes#endif
910255581Sdes
911255581Sdes
912255581Sdes#ifndef HAVE_GMTIME_R
913255581Sdes#define gmtime_r gmtime_r_unbound
914255581Sdesstruct tm *gmtime_r(const time_t *timep, struct tm *result);
915255581Sdes#endif
916255581Sdes
917255581Sdes
918291767Sdes#ifndef HAVE_REALLOCARRAY
919291767Sdes#define reallocarray reallocarrayunbound
920291767Sdesvoid* reallocarray(void *ptr, size_t nmemb, size_t size);
921291767Sdes#endif
922291767Sdes
923291767Sdes
924269257Sdes#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
925255581Sdes#define sleep(x) Sleep((x)*1000) /* on win32 */
926255581Sdes#endif /* HAVE_SLEEP */
927255581Sdes
928255581Sdes
929255581Sdes#ifndef HAVE_USLEEP
930255581Sdes#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
931255581Sdes#endif /* HAVE_USLEEP */
932255581Sdes
933255581Sdes
934255581Sdes#ifndef HAVE_RANDOM
935255581Sdes#define random rand /* on win32, for tests only (bad random) */
936255581Sdes#endif /* HAVE_RANDOM */
937255581Sdes
938255581Sdes
939255581Sdes#ifndef HAVE_SRANDOM
940255581Sdes#define srandom(x) srand(x) /* on win32, for tests only (bad random) */
941255581Sdes#endif /* HAVE_SRANDOM */
942255581Sdes
943255581Sdes
944255581Sdes/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
945255581Sdes#ifdef HAVE_WINSOCK2_H
946255581Sdes#define FD_SET_T (u_int)
947255581Sdes#else
948255581Sdes#define FD_SET_T
949255581Sdes#endif
950255581Sdes
951255581Sdes
952255581Sdes#ifndef IPV6_MIN_MTU
953255581Sdes#define IPV6_MIN_MTU 1280
954255581Sdes#endif /* IPV6_MIN_MTU */
955255581Sdes
956255581Sdes
957255581Sdes#ifdef MEMCMP_IS_BROKEN
958255581Sdes#include "compat/memcmp.h"
959255581Sdes#define memcmp memcmp_unbound
960255581Sdesint memcmp(const void *x, const void *y, size_t n);
961255581Sdes#endif
962255581Sdes
963255581Sdes
964255581Sdes
965255581Sdes#ifndef HAVE_CTIME_R
966255581Sdes#define ctime_r unbound_ctime_r
967255581Sdeschar *ctime_r(const time_t *timep, char *buf);
968255581Sdes#endif
969255581Sdes
970294190Sdes#ifndef HAVE_ISBLANK
971294190Sdes#define isblank unbound_isblank
972294190Sdesint isblank(int c);
973294190Sdes#endif
974294190Sdes
975255581Sdes#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
976255581Sdes#define strptime unbound_strptime
977255581Sdesstruct tm;
978255581Sdeschar *strptime(const char *s, const char *format, struct tm *tm);
979255581Sdes#endif
980255581Sdes
981285206Sdes#ifdef HAVE_LIBRESSL
982285206Sdes#  if !HAVE_DECL_STRLCPY
983285206Sdessize_t strlcpy(char *dst, const char *src, size_t siz);
984285206Sdes#  endif
985285206Sdes#  if !HAVE_DECL_STRLCAT
986285206Sdessize_t strlcat(char *dst, const char *src, size_t siz);
987285206Sdes#  endif
988285206Sdes#  if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
989285206Sdesuint32_t arc4random(void);
990285206Sdes#  endif
991285206Sdes#  if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
992285206Sdesuint32_t arc4random_uniform(uint32_t upper_bound);
993285206Sdes#  endif
994291767Sdes#  if !HAVE_DECL_REALLOCARRAY
995291767Sdesvoid *reallocarray(void *ptr, size_t nmemb, size_t size);
996291767Sdes#  endif
997285206Sdes#endif /* HAVE_LIBRESSL */
998285206Sdes#ifndef HAVE_ARC4RANDOM
999285206Sdesvoid explicit_bzero(void* buf, size_t len);
1000285206Sdesint getentropy(void* buf, size_t len);
1001285206Sdesuint32_t arc4random(void);
1002285206Sdesvoid arc4random_buf(void* buf, size_t n);
1003285206Sdesvoid _ARC4_LOCK(void);
1004285206Sdesvoid _ARC4_UNLOCK(void);
1005285206Sdes#endif
1006285206Sdes#ifndef HAVE_ARC4RANDOM_UNIFORM
1007285206Sdesuint32_t arc4random_uniform(uint32_t upper_bound);
1008285206Sdes#endif
1009285206Sdes#ifdef COMPAT_SHA512
1010285206Sdes#ifndef SHA512_DIGEST_LENGTH
1011285206Sdes#define SHA512_BLOCK_LENGTH		128
1012285206Sdes#define SHA512_DIGEST_LENGTH		64
1013285206Sdes#define SHA512_DIGEST_STRING_LENGTH	(SHA512_DIGEST_LENGTH * 2 + 1)
1014285206Sdestypedef struct _SHA512_CTX {
1015285206Sdes	uint64_t	state[8];
1016285206Sdes	uint64_t	bitcount[2];
1017285206Sdes	uint8_t	buffer[SHA512_BLOCK_LENGTH];
1018285206Sdes} SHA512_CTX;
1019285206Sdes#endif /* SHA512_DIGEST_LENGTH */
1020285206Sdesvoid SHA512_Init(SHA512_CTX*);
1021285206Sdesvoid SHA512_Update(SHA512_CTX*, void*, size_t);
1022285206Sdesvoid SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1023285206Sdesunsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1024285206Sdes#endif /* COMPAT_SHA512 */
1025285206Sdes
1026285206Sdes
1027285206Sdes
1028255581Sdes#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))
1029255581Sdes   /* using version of libevent that is not threadsafe. */
1030255581Sdes#  define LIBEVENT_SIGNAL_PROBLEM 1
1031255581Sdes#endif
1032255581Sdes
1033255581Sdes#ifndef CHECKED_INET6
1034255581Sdes#  define CHECKED_INET6
1035255581Sdes#  ifdef AF_INET6
1036255581Sdes#    define INET6
1037255581Sdes#  else
1038255581Sdes#    define AF_INET6        28
1039255581Sdes#  endif
1040255581Sdes#endif /* CHECKED_INET6 */
1041255581Sdes
1042255581Sdes#ifndef HAVE_GETADDRINFO
1043255581Sdesstruct sockaddr_storage;
1044255581Sdes#include "compat/fake-rfc2553.h"
1045255581Sdes#endif
1046255581Sdes
1047255581Sdes#ifdef UNBOUND_ALLOC_STATS
1048255581Sdes#  define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1049255581Sdes#  define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1050255581Sdes#  define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1051255581Sdes#  define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1052255581Sdesvoid *unbound_stat_malloc(size_t size);
1053255581Sdesvoid *unbound_stat_calloc(size_t nmemb, size_t size);
1054255581Sdesvoid unbound_stat_free(void *ptr);
1055255581Sdesvoid *unbound_stat_realloc(void *ptr, size_t size);
1056255581Sdesvoid *unbound_stat_malloc_log(size_t size, const char* file, int line,
1057255581Sdes	const char* func);
1058255581Sdesvoid *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1059255581Sdes	int line, const char* func);
1060255581Sdesvoid unbound_stat_free_log(void *ptr, const char* file, int line,
1061255581Sdes	const char* func);
1062255581Sdesvoid *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1063255581Sdes	int line, const char* func);
1064255581Sdes#elif defined(UNBOUND_ALLOC_LITE)
1065255581Sdes#  include "util/alloc.h"
1066255581Sdes#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1067255581Sdes
1068255581Sdes/** default port for DNS traffic. */
1069255581Sdes#define UNBOUND_DNS_PORT 53
1070255581Sdes/** default port for unbound control traffic, registered port with IANA,
1071255581Sdes    ub-dns-control  8953/tcp    unbound dns nameserver control */
1072255581Sdes#define UNBOUND_CONTROL_PORT 8953
1073255581Sdes/** the version of unbound-control that this software implements */
1074255581Sdes#define UNBOUND_CONTROL_VERSION 1
1075255581Sdes
1076255581Sdes
1077