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