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