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