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