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