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