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