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