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