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