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