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