xref: /freebsd/contrib/unbound/config.h.in (revision a4adfaf712694ce7923d5309cf87d0cd2a598953)
1/* config.h.in.  Generated from configure.ac by autoheader.  */
2
3/* apply the noreturn attribute to a function that exits the program */
4#undef ATTR_NORETURN
5
6/* apply the weak attribute to a symbol */
7#undef ATTR_WEAK
8
9/* Directory to chroot to */
10#undef CHROOT_DIR
11
12/* Define this to enable client subnet option. */
13#undef CLIENT_SUBNET
14
15/* Do sha512 definitions in config.h */
16#undef COMPAT_SHA512
17
18/* Command line arguments used with configure */
19#undef CONFCMDLINE
20
21/* Pathname to the Unbound configuration file */
22#undef CONFIGFILE
23
24/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
25   */
26#undef DARWIN_BROKEN_SETREUID
27
28/* Whether daemon is deprecated */
29#undef DEPRECATED_DAEMON
30
31/* Deprecate RSA 1024 bit length, makes that an unsupported key */
32#undef DEPRECATE_RSA_1024
33
34/* Define this to enable kernel based UDP source port randomization. */
35#undef DISABLE_EXPLICIT_PORT_RANDOMISATION
36
37/* default dnstap socket path */
38#undef DNSTAP_SOCKET_PATH
39
40/* Define if you want to use debug lock checking (slow). */
41#undef ENABLE_LOCK_CHECKS
42
43/* Define this if you enabled-allsymbols from libunbound to link binaries to
44   it for smaller install size, but the libunbound export table is polluted by
45   internal symbols */
46#undef EXPORT_ALL_SYMBOLS
47
48/* Define to 1 if you have the `accept4' function. */
49#undef HAVE_ACCEPT4
50
51/* Define to 1 if you have the `arc4random' function. */
52#undef HAVE_ARC4RANDOM
53
54/* Define to 1 if you have the `arc4random_uniform' function. */
55#undef HAVE_ARC4RANDOM_UNIFORM
56
57/* Define to 1 if you have the <arpa/inet.h> header file. */
58#undef HAVE_ARPA_INET_H
59
60/* Whether the C compiler accepts the "format" attribute */
61#undef HAVE_ATTR_FORMAT
62
63/* Whether the C compiler accepts the "noreturn" attribute */
64#undef HAVE_ATTR_NORETURN
65
66/* Whether the C compiler accepts the "unused" attribute */
67#undef HAVE_ATTR_UNUSED
68
69/* Whether the C compiler accepts the "weak" attribute */
70#undef HAVE_ATTR_WEAK
71
72/* If we have be64toh */
73#undef HAVE_BE64TOH
74
75/* Define to 1 if you have the `BIO_set_callback_ex' function. */
76#undef HAVE_BIO_SET_CALLBACK_EX
77
78/* Define to 1 if you have the <bsd/stdlib.h> header file. */
79#undef HAVE_BSD_STDLIB_H
80
81/* Define to 1 if you have the <bsd/string.h> header file. */
82#undef HAVE_BSD_STRING_H
83
84/* Define to 1 if you have the `chown' function. */
85#undef HAVE_CHOWN
86
87/* Define to 1 if you have the `chroot' function. */
88#undef HAVE_CHROOT
89
90/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
91#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
92
93/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */
94#undef HAVE_CRYPTO_THREADID_SET_CALLBACK
95
96/* Define to 1 if you have the `ctime_r' function. */
97#undef HAVE_CTIME_R
98
99/* Define to 1 if you have the `daemon' function. */
100#undef HAVE_DAEMON
101
102/* Define to 1 if you have the declaration of `arc4random', and to 0 if you
103   don't. */
104#undef HAVE_DECL_ARC4RANDOM
105
106/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
107   if you don't. */
108#undef HAVE_DECL_ARC4RANDOM_UNIFORM
109
110/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if
111   you don't. */
112#undef HAVE_DECL_EVSIGNAL_ASSIGN
113
114/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
115   don't. */
116#undef HAVE_DECL_INET_NTOP
117
118/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
119   don't. */
120#undef HAVE_DECL_INET_PTON
121
122/* Define to 1 if you have the declaration of `nghttp2_session_server_new',
123   and to 0 if you don't. */
124#undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW
125
126/* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
127   don't. */
128#undef HAVE_DECL_NID_ED25519
129
130/* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you
131   don't. */
132#undef HAVE_DECL_NID_ED448
133
134/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
135   don't. */
136#undef HAVE_DECL_NID_SECP384R1
137
138/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
139   if you don't. */
140#undef HAVE_DECL_NID_X9_62_PRIME256V1
141
142/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
143   don't. */
144#undef HAVE_DECL_REALLOCARRAY
145
146/* Define to 1 if you have the declaration of `redisConnect', and to 0 if you
147   don't. */
148#undef HAVE_DECL_REDISCONNECT
149
150/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
151   if you don't. */
152#undef HAVE_DECL_SK_SSL_COMP_POP_FREE
153
154/* Define to 1 if you have the declaration of
155   `SSL_COMP_get_compression_methods', and to 0 if you don't. */
156#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
157
158/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
159   0 if you don't. */
160#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO
161
162/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
163   don't. */
164#undef HAVE_DECL_STRLCAT
165
166/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
167   don't. */
168#undef HAVE_DECL_STRLCPY
169
170/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
171   you don't. */
172#undef HAVE_DECL_XML_STOPPARSER
173
174/* Define to 1 if you have the <dlfcn.h> header file. */
175#undef HAVE_DLFCN_H
176
177/* Define to 1 if you have the `DSA_SIG_set0' function. */
178#undef HAVE_DSA_SIG_SET0
179
180/* Define to 1 if you have the <endian.h> header file. */
181#undef HAVE_ENDIAN_H
182
183/* Define to 1 if you have the `endprotoent' function. */
184#undef HAVE_ENDPROTOENT
185
186/* Define to 1 if you have the `endpwent' function. */
187#undef HAVE_ENDPWENT
188
189/* Define to 1 if you have the `endservent' function. */
190#undef HAVE_ENDSERVENT
191
192/* Define to 1 if you have the `ENGINE_cleanup' function. */
193#undef HAVE_ENGINE_CLEANUP
194
195/* Define to 1 if you have the `ERR_free_strings' function. */
196#undef HAVE_ERR_FREE_STRINGS
197
198/* Define to 1 if you have the `ERR_load_crypto_strings' function. */
199#undef HAVE_ERR_LOAD_CRYPTO_STRINGS
200
201/* Define to 1 if you have the `event_assign' function. */
202#undef HAVE_EVENT_ASSIGN
203
204/* Define to 1 if you have the `event_base_free' function. */
205#undef HAVE_EVENT_BASE_FREE
206
207/* Define to 1 if you have the `event_base_get_method' function. */
208#undef HAVE_EVENT_BASE_GET_METHOD
209
210/* Define to 1 if you have the `event_base_new' function. */
211#undef HAVE_EVENT_BASE_NEW
212
213/* Define to 1 if you have the `event_base_once' function. */
214#undef HAVE_EVENT_BASE_ONCE
215
216/* Define to 1 if you have the <event.h> header file. */
217#undef HAVE_EVENT_H
218
219/* Define to 1 if you have the `EVP_aes_256_cbc' function. */
220#undef HAVE_EVP_AES_256_CBC
221
222/* Define to 1 if you have the `EVP_cleanup' function. */
223#undef HAVE_EVP_CLEANUP
224
225/* Define to 1 if you have the `EVP_DigestVerify' function. */
226#undef HAVE_EVP_DIGESTVERIFY
227
228/* Define to 1 if you have the `EVP_dss1' function. */
229#undef HAVE_EVP_DSS1
230
231/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
232#undef HAVE_EVP_ENCRYPTINIT_EX
233
234/* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */
235#undef HAVE_EVP_MAC_CTX_SET_PARAMS
236
237/* Define to 1 if you have the `EVP_MD_CTX_new' function. */
238#undef HAVE_EVP_MD_CTX_NEW
239
240/* Define to 1 if you have the `EVP_sha1' function. */
241#undef HAVE_EVP_SHA1
242
243/* Define to 1 if you have the `EVP_sha256' function. */
244#undef HAVE_EVP_SHA256
245
246/* Define to 1 if you have the `EVP_sha512' function. */
247#undef HAVE_EVP_SHA512
248
249/* Define to 1 if you have the `ev_default_loop' function. */
250#undef HAVE_EV_DEFAULT_LOOP
251
252/* Define to 1 if you have the `ev_loop' function. */
253#undef HAVE_EV_LOOP
254
255/* Define to 1 if you have the <expat.h> header file. */
256#undef HAVE_EXPAT_H
257
258/* Define to 1 if you have the `explicit_bzero' function. */
259#undef HAVE_EXPLICIT_BZERO
260
261/* Define to 1 if you have the `fcntl' function. */
262#undef HAVE_FCNTL
263
264/* Define to 1 if you have the `FIPS_mode' function. */
265#undef HAVE_FIPS_MODE
266
267/* Define to 1 if you have the `fork' function. */
268#undef HAVE_FORK
269
270/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
271#undef HAVE_FSEEKO
272
273/* Define to 1 if you have the `fsync' function. */
274#undef HAVE_FSYNC
275
276/* Whether getaddrinfo is available */
277#undef HAVE_GETADDRINFO
278
279/* Define to 1 if you have the `getauxval' function. */
280#undef HAVE_GETAUXVAL
281
282/* Define to 1 if you have the `getentropy' function. */
283#undef HAVE_GETENTROPY
284
285/* Define to 1 if you have the `getifaddrs' function. */
286#undef HAVE_GETIFADDRS
287
288/* Define to 1 if you have the <getopt.h> header file. */
289#undef HAVE_GETOPT_H
290
291/* Define to 1 if you have the `getpwnam' function. */
292#undef HAVE_GETPWNAM
293
294/* Define to 1 if you have the `getrlimit' function. */
295#undef HAVE_GETRLIMIT
296
297/* Define to 1 if you have the `glob' function. */
298#undef HAVE_GLOB
299
300/* Define to 1 if you have the <glob.h> header file. */
301#undef HAVE_GLOB_H
302
303/* Define to 1 if you have the `gmtime_r' function. */
304#undef HAVE_GMTIME_R
305
306/* Define to 1 if you have the <grp.h> header file. */
307#undef HAVE_GRP_H
308
309/* Define to 1 if you have the <hiredis/hiredis.h> header file. */
310#undef HAVE_HIREDIS_HIREDIS_H
311
312/* Define to 1 if you have the `HMAC_Init_ex' function. */
313#undef HAVE_HMAC_INIT_EX
314
315/* If we have htobe64 */
316#undef HAVE_HTOBE64
317
318/* Define to 1 if you have the <ifaddrs.h> header file. */
319#undef HAVE_IFADDRS_H
320
321/* Define to 1 if you have the `if_nametoindex' function. */
322#undef HAVE_IF_NAMETOINDEX
323
324/* Define to 1 if you have the `inet_aton' function. */
325#undef HAVE_INET_ATON
326
327/* Define to 1 if you have the `inet_ntop' function. */
328#undef HAVE_INET_NTOP
329
330/* Define to 1 if you have the `inet_pton' function. */
331#undef HAVE_INET_PTON
332
333/* Define to 1 if you have the `initgroups' function. */
334#undef HAVE_INITGROUPS
335
336/* Define to 1 if you have the <inttypes.h> header file. */
337#undef HAVE_INTTYPES_H
338
339/* if the function 'ioctlsocket' is available */
340#undef HAVE_IOCTLSOCKET
341
342/* Define to 1 if you have the <iphlpapi.h> header file. */
343#undef HAVE_IPHLPAPI_H
344
345/* Define to 1 if you have the `isblank' function. */
346#undef HAVE_ISBLANK
347
348/* Define to 1 if you have the `kill' function. */
349#undef HAVE_KILL
350
351/* Use portable libbsd functions */
352#undef HAVE_LIBBSD
353
354/* Define to 1 if you have the <libkern/OSByteOrder.h> header file. */
355#undef HAVE_LIBKERN_OSBYTEORDER_H
356
357/* Define if we have LibreSSL */
358#undef HAVE_LIBRESSL
359
360/* Define to 1 if you have the `localtime_r' function. */
361#undef HAVE_LOCALTIME_R
362
363/* Define to 1 if you have the <login_cap.h> header file. */
364#undef HAVE_LOGIN_CAP_H
365
366/* If have GNU libc compatible malloc */
367#undef HAVE_MALLOC
368
369/* Define to 1 if you have the `memmove' function. */
370#undef HAVE_MEMMOVE
371
372/* Define to 1 if you have the <memory.h> header file. */
373#undef HAVE_MEMORY_H
374
375/* Define to 1 if you have the <netdb.h> header file. */
376#undef HAVE_NETDB_H
377
378/* Define to 1 if you have the <netinet/in.h> header file. */
379#undef HAVE_NETINET_IN_H
380
381/* Define to 1 if you have the <netinet/tcp.h> header file. */
382#undef HAVE_NETINET_TCP_H
383
384/* Define to 1 if you have the <netioapi.h> header file. */
385#undef HAVE_NETIOAPI_H
386
387/* Use libnettle for crypto */
388#undef HAVE_NETTLE
389
390/* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
391#undef HAVE_NETTLE_DSA_COMPAT_H
392
393/* Define to 1 if you have the <nettle/eddsa.h> header file. */
394#undef HAVE_NETTLE_EDDSA_H
395
396/* Define to 1 if you have the <net/if.h> header file. */
397#undef HAVE_NET_IF_H
398
399/* Define this to use nghttp2 client. */
400#undef HAVE_NGHTTP2
401
402/* Define to 1 if you have the <nghttp2/nghttp2.h> header file. */
403#undef HAVE_NGHTTP2_NGHTTP2_H
404
405/* Use libnss for crypto */
406#undef HAVE_NSS
407
408/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
409#undef HAVE_OPENSSL_ADD_ALL_DIGESTS
410
411/* Define to 1 if you have the <openssl/bn.h> header file. */
412#undef HAVE_OPENSSL_BN_H
413
414/* Define to 1 if you have the `OPENSSL_config' function. */
415#undef HAVE_OPENSSL_CONFIG
416
417/* Define to 1 if you have the <openssl/conf.h> header file. */
418#undef HAVE_OPENSSL_CONF_H
419
420/* Define to 1 if you have the <openssl/core_names.h> header file. */
421#undef HAVE_OPENSSL_CORE_NAMES_H
422
423/* Define to 1 if you have the <openssl/dh.h> header file. */
424#undef HAVE_OPENSSL_DH_H
425
426/* Define to 1 if you have the <openssl/dsa.h> header file. */
427#undef HAVE_OPENSSL_DSA_H
428
429/* Define to 1 if you have the <openssl/engine.h> header file. */
430#undef HAVE_OPENSSL_ENGINE_H
431
432/* Define to 1 if you have the <openssl/err.h> header file. */
433#undef HAVE_OPENSSL_ERR_H
434
435/* Define to 1 if you have the `OPENSSL_init_crypto' function. */
436#undef HAVE_OPENSSL_INIT_CRYPTO
437
438/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
439#undef HAVE_OPENSSL_INIT_SSL
440
441/* Define to 1 if you have the <openssl/param_build.h> header file. */
442#undef HAVE_OPENSSL_PARAM_BUILD_H
443
444/* Define to 1 if you have the <openssl/rand.h> header file. */
445#undef HAVE_OPENSSL_RAND_H
446
447/* Define to 1 if you have the <openssl/rsa.h> header file. */
448#undef HAVE_OPENSSL_RSA_H
449
450/* Define to 1 if you have the <openssl/ssl.h> header file. */
451#undef HAVE_OPENSSL_SSL_H
452
453/* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */
454#undef HAVE_OSSL_PARAM_BLD_NEW
455
456/* Define if you have POSIX threads libraries and header files. */
457#undef HAVE_PTHREAD
458
459/* Have PTHREAD_PRIO_INHERIT. */
460#undef HAVE_PTHREAD_PRIO_INHERIT
461
462/* Define to 1 if the system has the type `pthread_rwlock_t'. */
463#undef HAVE_PTHREAD_RWLOCK_T
464
465/* Define to 1 if the system has the type `pthread_spinlock_t'. */
466#undef HAVE_PTHREAD_SPINLOCK_T
467
468/* Define to 1 if you have the <pwd.h> header file. */
469#undef HAVE_PWD_H
470
471/* Define if you have Python libraries and header files. */
472#undef HAVE_PYTHON
473
474/* Define to 1 if you have the `random' function. */
475#undef HAVE_RANDOM
476
477/* Define to 1 if you have the `RAND_cleanup' function. */
478#undef HAVE_RAND_CLEANUP
479
480/* If we have reallocarray(3) */
481#undef HAVE_REALLOCARRAY
482
483/* Define to 1 if you have the `recvmsg' function. */
484#undef HAVE_RECVMSG
485
486/* Define to 1 if you have the `sendmsg' function. */
487#undef HAVE_SENDMSG
488
489/* Define to 1 if you have the `setregid' function. */
490#undef HAVE_SETREGID
491
492/* Define to 1 if you have the `setresgid' function. */
493#undef HAVE_SETRESGID
494
495/* Define to 1 if you have the `setresuid' function. */
496#undef HAVE_SETRESUID
497
498/* Define to 1 if you have the `setreuid' function. */
499#undef HAVE_SETREUID
500
501/* Define to 1 if you have the `setrlimit' function. */
502#undef HAVE_SETRLIMIT
503
504/* Define to 1 if you have the `setsid' function. */
505#undef HAVE_SETSID
506
507/* Define to 1 if you have the `setusercontext' function. */
508#undef HAVE_SETUSERCONTEXT
509
510/* Define to 1 if you have the `SHA512_Update' function. */
511#undef HAVE_SHA512_UPDATE
512
513/* Define to 1 if you have the `shmget' function. */
514#undef HAVE_SHMGET
515
516/* Define to 1 if you have the `sigprocmask' function. */
517#undef HAVE_SIGPROCMASK
518
519/* Define to 1 if you have the `sleep' function. */
520#undef HAVE_SLEEP
521
522/* Define to 1 if you have the `snprintf' function. */
523#undef HAVE_SNPRINTF
524
525/* Define to 1 if you have the `socketpair' function. */
526#undef HAVE_SOCKETPAIR
527
528/* Using Solaris threads */
529#undef HAVE_SOLARIS_THREADS
530
531/* Define to 1 if you have the `srandom' function. */
532#undef HAVE_SRANDOM
533
534/* Define if you have the SSL libraries installed. */
535#undef HAVE_SSL
536
537/* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */
538#undef HAVE_SSL_CTX_SET_ALPN_PROTOS
539
540/* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */
541#undef HAVE_SSL_CTX_SET_ALPN_SELECT_CB
542
543/* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */
544#undef HAVE_SSL_CTX_SET_CIPHERSUITES
545
546/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
547#undef HAVE_SSL_CTX_SET_SECURITY_LEVEL
548
549/* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb'
550   function. */
551#undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB
552
553/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */
554#undef HAVE_SSL_GET0_ALPN_SELECTED
555
556/* Define to 1 if you have the `SSL_get0_peername' function. */
557#undef HAVE_SSL_GET0_PEERNAME
558
559/* Define to 1 if you have the `SSL_get1_peer_certificate' function. */
560#undef HAVE_SSL_GET1_PEER_CERTIFICATE
561
562/* Define to 1 if you have the `SSL_set1_host' function. */
563#undef HAVE_SSL_SET1_HOST
564
565/* Define to 1 if you have the <stdarg.h> header file. */
566#undef HAVE_STDARG_H
567
568/* Define to 1 if you have the <stdbool.h> header file. */
569#undef HAVE_STDBOOL_H
570
571/* Define to 1 if you have the <stdint.h> header file. */
572#undef HAVE_STDINT_H
573
574/* Define to 1 if you have the <stdlib.h> header file. */
575#undef HAVE_STDLIB_H
576
577/* Define to 1 if you have the `strftime' function. */
578#undef HAVE_STRFTIME
579
580/* Define to 1 if you have the <strings.h> header file. */
581#undef HAVE_STRINGS_H
582
583/* Define to 1 if you have the <string.h> header file. */
584#undef HAVE_STRING_H
585
586/* Define to 1 if you have the `strlcat' function. */
587#undef HAVE_STRLCAT
588
589/* Define to 1 if you have the `strlcpy' function. */
590#undef HAVE_STRLCPY
591
592/* Define to 1 if you have the `strptime' function. */
593#undef HAVE_STRPTIME
594
595/* Define to 1 if you have the `strsep' function. */
596#undef HAVE_STRSEP
597
598/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
599#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
600
601/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
602#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
603
604/* Define if you have Swig libraries and header files. */
605#undef HAVE_SWIG
606
607/* Define to 1 if you have the <syslog.h> header file. */
608#undef HAVE_SYSLOG_H
609
610/* Define to 1 if systemd should be used */
611#undef HAVE_SYSTEMD
612
613/* Define to 1 if you have the <sys/endian.h> header file. */
614#undef HAVE_SYS_ENDIAN_H
615
616/* Define to 1 if you have the <sys/ipc.h> header file. */
617#undef HAVE_SYS_IPC_H
618
619/* Define to 1 if you have the <sys/param.h> header file. */
620#undef HAVE_SYS_PARAM_H
621
622/* Define to 1 if you have the <sys/resource.h> header file. */
623#undef HAVE_SYS_RESOURCE_H
624
625/* Define to 1 if you have the <sys/select.h> header file. */
626#undef HAVE_SYS_SELECT_H
627
628/* Define to 1 if you have the <sys/sha2.h> header file. */
629#undef HAVE_SYS_SHA2_H
630
631/* Define to 1 if you have the <sys/shm.h> header file. */
632#undef HAVE_SYS_SHM_H
633
634/* Define to 1 if you have the <sys/socket.h> header file. */
635#undef HAVE_SYS_SOCKET_H
636
637/* Define to 1 if you have the <sys/stat.h> header file. */
638#undef HAVE_SYS_STAT_H
639
640/* Define to 1 if you have the <sys/sysctl.h> header file. */
641#undef HAVE_SYS_SYSCTL_H
642
643/* Define to 1 if you have the <sys/types.h> header file. */
644#undef HAVE_SYS_TYPES_H
645
646/* Define to 1 if you have the <sys/uio.h> header file. */
647#undef HAVE_SYS_UIO_H
648
649/* Define to 1 if you have the <sys/un.h> header file. */
650#undef HAVE_SYS_UN_H
651
652/* Define to 1 if you have the <sys/wait.h> header file. */
653#undef HAVE_SYS_WAIT_H
654
655/* Define to 1 if you have the <TargetConditionals.h> header file. */
656#undef HAVE_TARGETCONDITIONALS_H
657
658/* Define to 1 if you have the <time.h> header file. */
659#undef HAVE_TIME_H
660
661/* Define to 1 if you have the `tzset' function. */
662#undef HAVE_TZSET
663
664/* Define to 1 if you have the <unistd.h> header file. */
665#undef HAVE_UNISTD_H
666
667/* Define to 1 if you have the `usleep' function. */
668#undef HAVE_USLEEP
669
670/* Define to 1 if you have the `vfork' function. */
671#undef HAVE_VFORK
672
673/* Define to 1 if you have the <vfork.h> header file. */
674#undef HAVE_VFORK_H
675
676/* Define to 1 if you have the <windows.h> header file. */
677#undef HAVE_WINDOWS_H
678
679/* Using Windows threads */
680#undef HAVE_WINDOWS_THREADS
681
682/* Define to 1 if you have the <winsock2.h> header file. */
683#undef HAVE_WINSOCK2_H
684
685/* Define to 1 if `fork' works. */
686#undef HAVE_WORKING_FORK
687
688/* Define to 1 if `vfork' works. */
689#undef HAVE_WORKING_VFORK
690
691/* Define to 1 if you have the `writev' function. */
692#undef HAVE_WRITEV
693
694/* Define to 1 if you have the <ws2tcpip.h> header file. */
695#undef HAVE_WS2TCPIP_H
696
697/* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */
698#undef HAVE_X509_VERIFY_PARAM_SET1_HOST
699
700/* Define to 1 if you have the `_beginthreadex' function. */
701#undef HAVE__BEGINTHREADEX
702
703/* If HMAC_Init_ex() returns void */
704#undef HMAC_INIT_EX_RETURNS_VOID
705
706/* if lex has yylex_destroy */
707#undef LEX_HAS_YYLEX_DESTROY
708
709/* Define to the sub-directory where libtool stores uninstalled libraries. */
710#undef LT_OBJDIR
711
712/* Define to the maximum message length to pass to syslog. */
713#undef MAXSYSLOGMSGLEN
714
715/* Define if memcmp() does not compare unsigned bytes */
716#undef MEMCMP_IS_BROKEN
717
718/* Define if mkdir has one argument. */
719#undef MKDIR_HAS_ONE_ARG
720
721/* Define if the network stack does not fully support nonblocking io (causes
722   lower performance). */
723#undef NONBLOCKING_IS_BROKEN
724
725/* Put -D_ALL_SOURCE define in config.h */
726#undef OMITTED__D_ALL_SOURCE
727
728/* Put -D_BSD_SOURCE define in config.h */
729#undef OMITTED__D_BSD_SOURCE
730
731/* Put -D_DEFAULT_SOURCE define in config.h */
732#undef OMITTED__D_DEFAULT_SOURCE
733
734/* Put -D_GNU_SOURCE define in config.h */
735#undef OMITTED__D_GNU_SOURCE
736
737/* Put -D_LARGEFILE_SOURCE=1 define in config.h */
738#undef OMITTED__D_LARGEFILE_SOURCE_1
739
740/* Put -D_POSIX_C_SOURCE=200112 define in config.h */
741#undef OMITTED__D_POSIX_C_SOURCE_200112
742
743/* Put -D_XOPEN_SOURCE=600 define in config.h */
744#undef OMITTED__D_XOPEN_SOURCE_600
745
746/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
747#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1
748
749/* Put -D__EXTENSIONS__ define in config.h */
750#undef OMITTED__D__EXTENSIONS__
751
752/* Define to the address where bug reports for this package should be sent. */
753#undef PACKAGE_BUGREPORT
754
755/* Define to the full name of this package. */
756#undef PACKAGE_NAME
757
758/* Define to the full name and version of this package. */
759#undef PACKAGE_STRING
760
761/* Define to the one symbol short name of this package. */
762#undef PACKAGE_TARNAME
763
764/* Define to the home page for this package. */
765#undef PACKAGE_URL
766
767/* Define to the version of this package. */
768#undef PACKAGE_VERSION
769
770/* default pidfile location */
771#undef PIDFILE
772
773/* Define to necessary symbol if this constant uses a non-standard name on
774   your system. */
775#undef PTHREAD_CREATE_JOINABLE
776
777/* Return type of signal handlers, but autoconf 2.70 says 'your code may
778   safely assume C89 semantics that RETSIGTYPE is void.' */
779#undef RETSIGTYPE
780
781/* if REUSEPORT is enabled by default */
782#undef REUSEPORT_DEFAULT
783
784/* default rootkey location */
785#undef ROOT_ANCHOR_FILE
786
787/* default rootcert location */
788#undef ROOT_CERT_FILE
789
790/* version number for resource files */
791#undef RSRC_PACKAGE_VERSION
792
793/* Directory to chdir to */
794#undef RUN_DIR
795
796/* Shared data */
797#undef SHARE_DIR
798
799/* The size of `size_t', as computed by sizeof. */
800#undef SIZEOF_SIZE_T
801
802/* The size of `time_t', as computed by sizeof. */
803#undef SIZEOF_TIME_T
804
805/* define if (v)snprintf does not return length needed, (but length used) */
806#undef SNPRINTF_RET_BROKEN
807
808/* Define to 1 if libsodium supports sodium_set_misuse_handler */
809#undef SODIUM_MISUSE_HANDLER
810
811/* Define to 1 if you have the ANSI C header files. */
812#undef STDC_HEADERS
813
814/* use default strptime. */
815#undef STRPTIME_WORKS
816
817/* Use win32 resources and API */
818#undef UB_ON_WINDOWS
819
820/* the SYSLOG_FACILITY to use, default LOG_DAEMON */
821#undef UB_SYSLOG_FACILITY
822
823/* default username */
824#undef UB_USERNAME
825
826/* use to enable lightweight alloc assertions, for debug use */
827#undef UNBOUND_ALLOC_LITE
828
829/* use malloc not regions, for debug use */
830#undef UNBOUND_ALLOC_NONREGIONAL
831
832/* use statistics for allocs and frees, for debug use */
833#undef UNBOUND_ALLOC_STATS
834
835/* define this to enable debug checks. */
836#undef UNBOUND_DEBUG
837
838/* Define to 1 to use cachedb support */
839#undef USE_CACHEDB
840
841/* Define to 1 to enable dnscrypt support */
842#undef USE_DNSCRYPT
843
844/* Define to 1 to enable dnscrypt with xchacha20 support */
845#undef USE_DNSCRYPT_XCHACHA20
846
847/* Define to 1 to enable dnstap support */
848#undef USE_DNSTAP
849
850/* Define this to enable DSA support. */
851#undef USE_DSA
852
853/* Define this to enable ECDSA support. */
854#undef USE_ECDSA
855
856/* Define this to enable an EVP workaround for older openssl */
857#undef USE_ECDSA_EVP_WORKAROUND
858
859/* Define this to enable ED25519 support. */
860#undef USE_ED25519
861
862/* Define this to enable ED448 support. */
863#undef USE_ED448
864
865/* Define this to enable GOST support. */
866#undef USE_GOST
867
868/* Define to 1 to use ipsecmod support. */
869#undef USE_IPSECMOD
870
871/* Define to 1 to use ipset support */
872#undef USE_IPSET
873
874/* Define if you enable libevent */
875#undef USE_LIBEVENT
876
877/* Define this to enable use of /proc/sys/net/ipv4/ip_local_port_range as a
878   default outgoing port range. This is only for the libunbound on Linux and
879   does not affect unbound resolving daemon itself. This may severely limit
880   the number of available outgoing ports and thus decrease randomness. Define
881   this only when the target system restricts (e.g. some of SELinux enabled
882   distributions) the use of non-ephemeral ports. */
883#undef USE_LINUX_IP_LOCAL_PORT_RANGE
884
885/* Define if you want to use internal select based events */
886#undef USE_MINI_EVENT
887
888/* Define this to enable client TCP Fast Open. */
889#undef USE_MSG_FASTOPEN
890
891/* Define this to enable client TCP Fast Open. */
892#undef USE_OSX_MSG_FASTOPEN
893
894/* Define this to use hiredis client. */
895#undef USE_REDIS
896
897/* Define this to enable SHA1 support. */
898#undef USE_SHA1
899
900/* Define this to enable SHA256 and SHA512 support. */
901#undef USE_SHA2
902
903/* Enable extensions on AIX 3, Interix.  */
904#ifndef _ALL_SOURCE
905# undef _ALL_SOURCE
906#endif
907/* Enable GNU extensions on systems that have them.  */
908#ifndef _GNU_SOURCE
909# undef _GNU_SOURCE
910#endif
911/* Enable threading extensions on Solaris.  */
912#ifndef _POSIX_PTHREAD_SEMANTICS
913# undef _POSIX_PTHREAD_SEMANTICS
914#endif
915/* Enable extensions on HP NonStop.  */
916#ifndef _TANDEM_SOURCE
917# undef _TANDEM_SOURCE
918#endif
919/* Enable general extensions on Solaris.  */
920#ifndef __EXTENSIONS__
921# undef __EXTENSIONS__
922#endif
923
924
925/* Define this to enable server TCP Fast Open. */
926#undef USE_TCP_FASTOPEN
927
928/* Whether the windows socket API is used */
929#undef USE_WINSOCK
930
931/* the version of the windows API enabled */
932#undef WINVER
933
934/* Define if you want dynlib module. */
935#undef WITH_DYNLIBMODULE
936
937/* Define if you want Python module. */
938#undef WITH_PYTHONMODULE
939
940/* Define if you want PyUnbound. */
941#undef WITH_PYUNBOUND
942
943/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
944   `char[]'. */
945#undef YYTEXT_POINTER
946
947/* Enable large inode numbers on Mac OS X 10.5.  */
948#ifndef _DARWIN_USE_64_BIT_INODE
949# define _DARWIN_USE_64_BIT_INODE 1
950#endif
951
952/* Number of bits in a file offset, on hosts where this is settable. */
953#undef _FILE_OFFSET_BITS
954
955/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
956#undef _LARGEFILE_SOURCE
957
958/* Define for large files, on AIX-style hosts. */
959#undef _LARGE_FILES
960
961/* Define to 1 if on MINIX. */
962#undef _MINIX
963
964/* Enable for compile on Minix */
965#undef _NETBSD_SOURCE
966
967/* Define to 2 if the system does not provide POSIX.1 features except with
968   this defined. */
969#undef _POSIX_1_SOURCE
970
971/* Define to 1 if you need to in order for `stat' and other things to work. */
972#undef _POSIX_SOURCE
973
974/* defined to use gcc ansi snprintf and sscanf that understands %lld when
975   compiled for windows. */
976#undef __USE_MINGW_ANSI_STDIO
977
978/* Define to empty if `const' does not conform to ANSI C. */
979#undef const
980
981/* Define to `int' if <sys/types.h> doesn't define. */
982#undef gid_t
983
984/* in_addr_t */
985#undef in_addr_t
986
987/* in_port_t */
988#undef in_port_t
989
990/* Define to `__inline__' or `__inline' if that's what the C compiler
991   calls it, or to nothing if 'inline' is not supported under any name.  */
992#ifndef __cplusplus
993#undef inline
994#endif
995
996/* Define to `short' if <sys/types.h> does not define. */
997#undef int16_t
998
999/* Define to `int' if <sys/types.h> does not define. */
1000#undef int32_t
1001
1002/* Define to `long long' if <sys/types.h> does not define. */
1003#undef int64_t
1004
1005/* Define to `signed char' if <sys/types.h> does not define. */
1006#undef int8_t
1007
1008/* Define if replacement function should be used. */
1009#undef malloc
1010
1011/* Define to `long int' if <sys/types.h> does not define. */
1012#undef off_t
1013
1014/* Define to `int' if <sys/types.h> does not define. */
1015#undef pid_t
1016
1017/* Define to 'int' if not defined */
1018#undef rlim_t
1019
1020/* Define to `unsigned int' if <sys/types.h> does not define. */
1021#undef size_t
1022
1023/* Define to 'int' if not defined */
1024#undef socklen_t
1025
1026/* Define to `int' if <sys/types.h> does not define. */
1027#undef ssize_t
1028
1029/* Define to 'unsigned char if not defined */
1030#undef u_char
1031
1032/* Define to `int' if <sys/types.h> doesn't define. */
1033#undef uid_t
1034
1035/* Define to `unsigned short' if <sys/types.h> does not define. */
1036#undef uint16_t
1037
1038/* Define to `unsigned int' if <sys/types.h> does not define. */
1039#undef uint32_t
1040
1041/* Define to `unsigned long long' if <sys/types.h> does not define. */
1042#undef uint64_t
1043
1044/* Define to `unsigned char' if <sys/types.h> does not define. */
1045#undef uint8_t
1046
1047/* Define as `fork' if `vfork' does not work. */
1048#undef vfork
1049
1050#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
1051#define _GNU_SOURCE 1
1052#endif
1053
1054#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
1055#define _BSD_SOURCE 1
1056#endif
1057
1058#if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
1059#define _DEFAULT_SOURCE 1
1060#endif
1061
1062#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
1063#define __EXTENSIONS__ 1
1064#endif
1065
1066#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
1067#define _POSIX_C_SOURCE 200112
1068#endif
1069
1070#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
1071#define _XOPEN_SOURCE 600
1072#endif
1073
1074#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
1075#define _XOPEN_SOURCE_EXTENDED 1
1076#endif
1077
1078#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
1079#define _ALL_SOURCE 1
1080#endif
1081
1082#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
1083#define _LARGEFILE_SOURCE 1
1084#endif
1085
1086
1087
1088
1089#ifndef _OPENBSD_SOURCE
1090#define _OPENBSD_SOURCE 1
1091#endif
1092
1093#ifndef UNBOUND_DEBUG
1094# ifndef NDEBUG
1095#  define NDEBUG
1096# endif
1097#endif
1098
1099/** Use small-ldns codebase */
1100#define USE_SLDNS 1
1101#ifdef HAVE_SSL
1102#  define LDNS_BUILD_CONFIG_HAVE_SSL 1
1103#endif
1104
1105#include <stdio.h>
1106#include <string.h>
1107#include <unistd.h>
1108#include <assert.h>
1109
1110#if STDC_HEADERS
1111#include <stdlib.h>
1112#include <stddef.h>
1113#endif
1114
1115#ifdef HAVE_STDARG_H
1116#include <stdarg.h>
1117#endif
1118
1119#ifdef HAVE_STDINT_H
1120#include <stdint.h>
1121#endif
1122
1123#include <errno.h>
1124
1125#if HAVE_SYS_PARAM_H
1126#include <sys/param.h>
1127#endif
1128
1129#ifdef HAVE_SYS_SOCKET_H
1130#include <sys/socket.h>
1131#endif
1132
1133#ifdef HAVE_SYS_UIO_H
1134#include <sys/uio.h>
1135#endif
1136
1137#ifdef HAVE_NETINET_IN_H
1138#include <netinet/in.h>
1139#endif
1140
1141#ifdef HAVE_NETINET_TCP_H
1142#include <netinet/tcp.h>
1143#endif
1144
1145#ifdef HAVE_ARPA_INET_H
1146#include <arpa/inet.h>
1147#endif
1148
1149#ifdef HAVE_WINSOCK2_H
1150#include <winsock2.h>
1151#endif
1152
1153#ifdef HAVE_WS2TCPIP_H
1154#include <ws2tcpip.h>
1155#endif
1156
1157#if !defined(USE_WINSOCK) || !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) || defined(__USE_MINGW_ANSI_STDIO)
1158#define ARG_LL "%ll"
1159#else
1160#define ARG_LL "%I64"
1161#endif
1162
1163#ifndef AF_LOCAL
1164#define AF_LOCAL AF_UNIX
1165#endif
1166
1167
1168
1169#ifdef HAVE_ATTR_FORMAT
1170#  define ATTR_FORMAT(archetype, string_index, first_to_check) \
1171    __attribute__ ((format (archetype, string_index, first_to_check)))
1172#else /* !HAVE_ATTR_FORMAT */
1173#  define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
1174#endif /* !HAVE_ATTR_FORMAT */
1175
1176
1177#if defined(DOXYGEN)
1178#  define ATTR_UNUSED(x)  x
1179#elif defined(__cplusplus)
1180#  define ATTR_UNUSED(x)
1181#elif defined(HAVE_ATTR_UNUSED)
1182#  define ATTR_UNUSED(x)  x __attribute__((unused))
1183#else /* !HAVE_ATTR_UNUSED */
1184#  define ATTR_UNUSED(x)  x
1185#endif /* !HAVE_ATTR_UNUSED */
1186
1187
1188#ifndef HAVE_FSEEKO
1189#define fseeko fseek
1190#define ftello ftell
1191#endif /* HAVE_FSEEKO */
1192
1193
1194#ifndef MAXHOSTNAMELEN
1195#define MAXHOSTNAMELEN 256
1196#endif
1197
1198#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
1199#define snprintf snprintf_unbound
1200#define vsnprintf vsnprintf_unbound
1201#include <stdarg.h>
1202int snprintf (char *str, size_t count, const char *fmt, ...);
1203int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
1204#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
1205
1206#ifndef HAVE_INET_PTON
1207#define inet_pton inet_pton_unbound
1208int inet_pton(int af, const char* src, void* dst);
1209#endif /* HAVE_INET_PTON */
1210
1211
1212#ifndef HAVE_INET_NTOP
1213#define inet_ntop inet_ntop_unbound
1214const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1215#endif
1216
1217
1218#ifndef HAVE_INET_ATON
1219#define inet_aton inet_aton_unbound
1220int inet_aton(const char *cp, struct in_addr *addr);
1221#endif
1222
1223
1224#ifndef HAVE_MEMMOVE
1225#define memmove memmove_unbound
1226void *memmove(void *dest, const void *src, size_t n);
1227#endif
1228
1229
1230#ifndef HAVE_STRLCAT
1231#define strlcat strlcat_unbound
1232size_t strlcat(char *dst, const char *src, size_t siz);
1233#endif
1234
1235
1236#ifndef HAVE_STRLCPY
1237#define strlcpy strlcpy_unbound
1238size_t strlcpy(char *dst, const char *src, size_t siz);
1239#endif
1240
1241
1242#ifndef HAVE_GMTIME_R
1243#define gmtime_r gmtime_r_unbound
1244struct tm *gmtime_r(const time_t *timep, struct tm *result);
1245#endif
1246
1247
1248#ifndef HAVE_REALLOCARRAY
1249#define reallocarray reallocarrayunbound
1250void* reallocarray(void *ptr, size_t nmemb, size_t size);
1251#endif
1252
1253
1254#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1255#define sleep(x) Sleep((x)*1000) /* on win32 */
1256#endif /* HAVE_SLEEP */
1257
1258
1259#ifndef HAVE_USLEEP
1260#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1261#endif /* HAVE_USLEEP */
1262
1263
1264#ifndef HAVE_RANDOM
1265#define random rand /* on win32, for tests only (bad random) */
1266#endif /* HAVE_RANDOM */
1267
1268
1269#ifndef HAVE_SRANDOM
1270#define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1271#endif /* HAVE_SRANDOM */
1272
1273
1274/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1275#ifdef HAVE_WINSOCK2_H
1276#define FD_SET_T (u_int)
1277#else
1278#define FD_SET_T
1279#endif
1280
1281
1282#ifndef IPV6_MIN_MTU
1283#define IPV6_MIN_MTU 1280
1284#endif /* IPV6_MIN_MTU */
1285
1286
1287#ifdef MEMCMP_IS_BROKEN
1288#include "compat/memcmp.h"
1289#define memcmp memcmp_unbound
1290int memcmp(const void *x, const void *y, size_t n);
1291#endif
1292
1293
1294
1295#ifndef HAVE_CTIME_R
1296#define ctime_r unbound_ctime_r
1297char *ctime_r(const time_t *timep, char *buf);
1298#endif
1299
1300#ifndef HAVE_STRSEP
1301#define strsep unbound_strsep
1302char *strsep(char **stringp, const char *delim);
1303#endif
1304
1305#ifndef HAVE_ISBLANK
1306#define isblank unbound_isblank
1307int isblank(int c);
1308#endif
1309
1310#ifndef HAVE_EXPLICIT_BZERO
1311#define explicit_bzero unbound_explicit_bzero
1312void explicit_bzero(void* buf, size_t len);
1313#endif
1314
1315#if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
1316const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1317#endif
1318
1319#if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
1320int inet_pton(int af, const char* src, void* dst);
1321#endif
1322
1323#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1324#define strptime unbound_strptime
1325struct tm;
1326char *strptime(const char *s, const char *format, struct tm *tm);
1327#endif
1328
1329#if !HAVE_DECL_REALLOCARRAY
1330void *reallocarray(void *ptr, size_t nmemb, size_t size);
1331#endif
1332
1333#ifdef HAVE_LIBBSD
1334#include <bsd/string.h>
1335#include <bsd/stdlib.h>
1336#endif
1337
1338#ifdef HAVE_LIBRESSL
1339#  if !HAVE_DECL_STRLCPY
1340size_t strlcpy(char *dst, const char *src, size_t siz);
1341#  endif
1342#  if !HAVE_DECL_STRLCAT
1343size_t strlcat(char *dst, const char *src, size_t siz);
1344#  endif
1345#  if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1346uint32_t arc4random(void);
1347#  endif
1348#  if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1349uint32_t arc4random_uniform(uint32_t upper_bound);
1350#  endif
1351#endif /* HAVE_LIBRESSL */
1352#ifndef HAVE_ARC4RANDOM
1353int getentropy(void* buf, size_t len);
1354uint32_t arc4random(void);
1355void arc4random_buf(void* buf, size_t n);
1356void _ARC4_LOCK(void);
1357void _ARC4_UNLOCK(void);
1358void _ARC4_LOCK_DESTROY(void);
1359#endif
1360#ifndef HAVE_ARC4RANDOM_UNIFORM
1361uint32_t arc4random_uniform(uint32_t upper_bound);
1362#endif
1363#ifdef COMPAT_SHA512
1364#ifndef SHA512_DIGEST_LENGTH
1365#define SHA512_BLOCK_LENGTH		128
1366#define SHA512_DIGEST_LENGTH		64
1367#define SHA512_DIGEST_STRING_LENGTH	(SHA512_DIGEST_LENGTH * 2 + 1)
1368typedef struct _SHA512_CTX {
1369	uint64_t	state[8];
1370	uint64_t	bitcount[2];
1371	uint8_t	buffer[SHA512_BLOCK_LENGTH];
1372} SHA512_CTX;
1373#endif /* SHA512_DIGEST_LENGTH */
1374void SHA512_Init(SHA512_CTX*);
1375void SHA512_Update(SHA512_CTX*, void*, size_t);
1376void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1377unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1378#endif /* COMPAT_SHA512 */
1379
1380
1381
1382#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))
1383   /* using version of libevent that is not threadsafe. */
1384#  define LIBEVENT_SIGNAL_PROBLEM 1
1385#endif
1386
1387#ifndef CHECKED_INET6
1388#  define CHECKED_INET6
1389#  ifdef AF_INET6
1390#    define INET6
1391#  else
1392#    define AF_INET6        28
1393#  endif
1394#endif /* CHECKED_INET6 */
1395
1396#ifndef HAVE_GETADDRINFO
1397struct sockaddr_storage;
1398#include "compat/fake-rfc2553.h"
1399#endif
1400
1401#ifdef UNBOUND_ALLOC_STATS
1402#  define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1403#  define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1404#  define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1405#  define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1406void *unbound_stat_malloc(size_t size);
1407void *unbound_stat_calloc(size_t nmemb, size_t size);
1408void unbound_stat_free(void *ptr);
1409void *unbound_stat_realloc(void *ptr, size_t size);
1410void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1411	const char* func);
1412void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1413	int line, const char* func);
1414void unbound_stat_free_log(void *ptr, const char* file, int line,
1415	const char* func);
1416void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1417	int line, const char* func);
1418#elif defined(UNBOUND_ALLOC_LITE)
1419#  include "util/alloc.h"
1420#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1421
1422/** default port for DNS traffic. */
1423#define UNBOUND_DNS_PORT 53
1424/** default port for DNS over TLS traffic. */
1425#define UNBOUND_DNS_OVER_TLS_PORT 853
1426/** default port for DNS over HTTPS traffic. */
1427#define UNBOUND_DNS_OVER_HTTPS_PORT 443
1428/** default port for unbound control traffic, registered port with IANA,
1429    ub-dns-control  8953/tcp    unbound dns nameserver control */
1430#define UNBOUND_CONTROL_PORT 8953
1431/** the version of unbound-control that this software implements */
1432#define UNBOUND_CONTROL_VERSION 1
1433
1434
1435