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