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