1 /* config.h. Generated from config.h.in by configure. */
2 /* config.h.in. Generated from configure.ac by autoheader. */
4 /* Directory to chroot to */
5 #define CHROOT_DIR "/var/unbound"
7 /* Pathname to the Unbound configuration file */
8 #define CONFIGFILE "/var/unbound/unbound.conf"
10 /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
12 /* #undef DARWIN_BROKEN_SETREUID */
14 /* Whether daemon is deprecated */
15 /* #undef DEPRECATED_DAEMON */
17 /* Define if you want to use debug lock checking (slow). */
18 /* #undef ENABLE_LOCK_CHECKS */
20 /* Define this if you enabled-allsymbols from libunbound to link binaries to
21 it for smaller install size, but the libunbound export table is polluted by
23 /* #undef EXPORT_ALL_SYMBOLS */
25 /* Define to 1 if you have the <arpa/inet.h> header file. */
26 #define HAVE_ARPA_INET_H 1
28 /* Whether the C compiler accepts the "format" attribute */
29 #define HAVE_ATTR_FORMAT 1
31 /* Whether the C compiler accepts the "unused" attribute */
32 #define HAVE_ATTR_UNUSED 1
34 /* Define to 1 if your system has a working `chown' function. */
37 /* Define to 1 if you have the `chroot' function. */
40 /* Define to 1 if you have the `ctime_r' function. */
41 #define HAVE_CTIME_R 1
43 /* Define to 1 if you have the `daemon' function. */
46 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
48 #define HAVE_DECL_NID_SECP384R1 1
50 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
52 #define HAVE_DECL_NID_X9_62_PRIME256V1 1
54 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
56 #define HAVE_DECL_SK_SSL_COMP_POP_FREE 1
58 /* Define to 1 if you have the declaration of
59 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
60 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1
62 /* Define to 1 if you have the <dlfcn.h> header file. */
63 #define HAVE_DLFCN_H 1
65 /* Define to 1 if you have the `event_base_free' function. */
66 /* #undef HAVE_EVENT_BASE_FREE */
68 /* Define to 1 if you have the `event_base_get_method' function. */
69 /* #undef HAVE_EVENT_BASE_GET_METHOD */
71 /* Define to 1 if you have the `event_base_new' function. */
72 /* #undef HAVE_EVENT_BASE_NEW */
74 /* Define to 1 if you have the `event_base_once' function. */
75 /* #undef HAVE_EVENT_BASE_ONCE */
77 /* Define to 1 if you have the <event.h> header file. */
78 /* #undef HAVE_EVENT_H */
80 /* Define to 1 if you have the `EVP_sha1' function. */
81 #define HAVE_EVP_SHA1 1
83 /* Define to 1 if you have the `EVP_sha256' function. */
84 #define HAVE_EVP_SHA256 1
86 /* Define to 1 if you have the `EVP_sha512' function. */
87 #define HAVE_EVP_SHA512 1
89 /* Define to 1 if you have the `ev_default_loop' function. */
90 /* #undef HAVE_EV_DEFAULT_LOOP */
92 /* Define to 1 if you have the `ev_loop' function. */
93 /* #undef HAVE_EV_LOOP */
95 /* Define to 1 if you have the <expat.h> header file. */
96 #define HAVE_EXPAT_H 1
98 /* Define to 1 if you have the `fcntl' function. */
101 /* Define to 1 if you have the `FIPS_mode' function. */
102 #define HAVE_FIPS_MODE 1
104 /* Define to 1 if you have the `fork' function. */
107 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
108 #define HAVE_FSEEKO 1
110 /* Whether getaddrinfo is available */
111 #define HAVE_GETADDRINFO 1
113 /* Define to 1 if you have the <getopt.h> header file. */
114 #define HAVE_GETOPT_H 1
116 /* Define to 1 if you have the `getpwnam' function. */
117 #define HAVE_GETPWNAM 1
119 /* Define to 1 if you have the `getrlimit' function. */
120 #define HAVE_GETRLIMIT 1
122 /* Define to 1 if you have the `glob' function. */
125 /* Define to 1 if you have the <glob.h> header file. */
126 #define HAVE_GLOB_H 1
128 /* Define to 1 if you have the `gmtime_r' function. */
129 #define HAVE_GMTIME_R 1
131 /* Define to 1 if you have the <grp.h> header file. */
134 /* If you have HMAC_CTX_init */
135 #define HAVE_HMAC_CTX_INIT 1
137 /* Define to 1 if you have the `inet_aton' function. */
138 #define HAVE_INET_ATON 1
140 /* Define to 1 if you have the `inet_ntop' function. */
141 #define HAVE_INET_NTOP 1
143 /* Define to 1 if you have the `inet_pton' function. */
144 #define HAVE_INET_PTON 1
146 /* Define to 1 if you have the `initgroups' function. */
147 #define HAVE_INITGROUPS 1
149 /* Define to 1 if you have the <inttypes.h> header file. */
150 #define HAVE_INTTYPES_H 1
152 /* if the function 'ioctlsocket' is available */
153 /* #undef HAVE_IOCTLSOCKET */
155 /* Define to 1 if you have the <iphlpapi.h> header file. */
156 /* #undef HAVE_IPHLPAPI_H */
158 /* Define to 1 if you have the `kill' function. */
161 /* Define to 1 if you have the `ldns_key_EVP_unload_gost' function. */
162 /* #undef HAVE_LDNS_KEY_EVP_UNLOAD_GOST */
164 /* Define to 1 if you have the <ldns/ldns.h> header file. */
165 #define HAVE_LDNS_LDNS_H 1
167 /* Define to 1 if you have the `ldns' library (-lldns). */
168 #define HAVE_LIBLDNS 1
170 /* Define to 1 if you have the `localtime_r' function. */
171 #define HAVE_LOCALTIME_R 1
173 /* Define to 1 if you have the <login_cap.h> header file. */
174 #define HAVE_LOGIN_CAP_H 1
176 /* If have GNU libc compatible malloc */
177 #define HAVE_MALLOC 1
179 /* Define to 1 if you have the `memmove' function. */
180 #define HAVE_MEMMOVE 1
182 /* Define to 1 if you have the <memory.h> header file. */
183 #define HAVE_MEMORY_H 1
185 /* Define to 1 if you have the <netdb.h> header file. */
186 #define HAVE_NETDB_H 1
188 /* Define to 1 if you have the <netinet/in.h> header file. */
189 #define HAVE_NETINET_IN_H 1
191 /* Use libnss for crypto */
192 /* #undef HAVE_NSS */
194 /* Define to 1 if you have the `OPENSSL_config' function. */
195 #define HAVE_OPENSSL_CONFIG 1
197 /* Define to 1 if you have the <openssl/conf.h> header file. */
198 #define HAVE_OPENSSL_CONF_H 1
200 /* Define to 1 if you have the <openssl/engine.h> header file. */
201 #define HAVE_OPENSSL_ENGINE_H 1
203 /* Define to 1 if you have the <openssl/err.h> header file. */
204 #define HAVE_OPENSSL_ERR_H 1
206 /* Define to 1 if you have the <openssl/rand.h> header file. */
207 #define HAVE_OPENSSL_RAND_H 1
209 /* Define to 1 if you have the <openssl/ssl.h> header file. */
210 #define HAVE_OPENSSL_SSL_H 1
212 /* Define if you have POSIX threads libraries and header files. */
213 #define HAVE_PTHREAD 1
215 /* Define to 1 if the system has the type `pthread_rwlock_t'. */
216 #define HAVE_PTHREAD_RWLOCK_T 1
218 /* Define to 1 if the system has the type `pthread_spinlock_t'. */
219 #define HAVE_PTHREAD_SPINLOCK_T 1
221 /* Define to 1 if you have the <pwd.h> header file. */
224 /* Define if you have Python libraries and header files. */
225 /* #undef HAVE_PYTHON */
227 /* Define to 1 if you have the `random' function. */
228 #define HAVE_RANDOM 1
230 /* Define to 1 if you have the `recvmsg' function. */
231 #define HAVE_RECVMSG 1
233 /* Define to 1 if you have the `sbrk' function. */
236 /* Define to 1 if you have the `sendmsg' function. */
237 #define HAVE_SENDMSG 1
239 /* Define to 1 if you have the `setregid' function. */
240 /* #undef HAVE_SETREGID */
242 /* Define to 1 if you have the `setresgid' function. */
243 #define HAVE_SETRESGID 1
245 /* Define to 1 if you have the `setresuid' function. */
246 #define HAVE_SETRESUID 1
248 /* Define to 1 if you have the `setreuid' function. */
249 /* #undef HAVE_SETREUID */
251 /* Define to 1 if you have the `setrlimit' function. */
252 #define HAVE_SETRLIMIT 1
254 /* Define to 1 if you have the `setsid' function. */
255 #define HAVE_SETSID 1
257 /* Define to 1 if you have the `setusercontext' function. */
258 #define HAVE_SETUSERCONTEXT 1
260 /* Define to 1 if you have the `sigprocmask' function. */
261 #define HAVE_SIGPROCMASK 1
263 /* Define to 1 if you have the `sleep' function. */
266 /* Define to 1 if you have the `snprintf' function. */
267 #define HAVE_SNPRINTF 1
269 /* Define to 1 if you have the `socketpair' function. */
270 #define HAVE_SOCKETPAIR 1
272 /* Using Solaris threads */
273 /* #undef HAVE_SOLARIS_THREADS */
275 /* Define to 1 if you have the `srandom' function. */
276 #define HAVE_SRANDOM 1
278 /* Define if you have the SSL libraries installed. */
279 #define HAVE_SSL /**/
281 /* Define to 1 if you have the <stdarg.h> header file. */
282 #define HAVE_STDARG_H 1
284 /* Define to 1 if you have the <stdbool.h> header file. */
285 #define HAVE_STDBOOL_H 1
287 /* Define to 1 if you have the <stdint.h> header file. */
288 #define HAVE_STDINT_H 1
290 /* Define to 1 if you have the <stdlib.h> header file. */
291 #define HAVE_STDLIB_H 1
293 /* Define to 1 if you have the `strftime' function. */
294 #define HAVE_STRFTIME 1
296 /* Define to 1 if you have the <strings.h> header file. */
297 #define HAVE_STRINGS_H 1
299 /* Define to 1 if you have the <string.h> header file. */
300 #define HAVE_STRING_H 1
302 /* Define to 1 if you have the `strlcpy' function. */
303 #define HAVE_STRLCPY 1
305 /* Define to 1 if you have the `strptime' function. */
306 #define HAVE_STRPTIME 1
308 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
309 /* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */
311 /* Define if you have Swig libraries and header files. */
312 /* #undef HAVE_SWIG */
314 /* Define to 1 if you have the <syslog.h> header file. */
315 #define HAVE_SYSLOG_H 1
317 /* Define to 1 if you have the <sys/param.h> header file. */
318 #define HAVE_SYS_PARAM_H 1
320 /* Define to 1 if you have the <sys/resource.h> header file. */
321 #define HAVE_SYS_RESOURCE_H 1
323 /* Define to 1 if you have the <sys/socket.h> header file. */
324 #define HAVE_SYS_SOCKET_H 1
326 /* Define to 1 if you have the <sys/stat.h> header file. */
327 #define HAVE_SYS_STAT_H 1
329 /* Define to 1 if you have the <sys/types.h> header file. */
330 #define HAVE_SYS_TYPES_H 1
332 /* Define to 1 if you have the <sys/uio.h> header file. */
333 #define HAVE_SYS_UIO_H 1
335 /* Define to 1 if you have the <sys/wait.h> header file. */
336 #define HAVE_SYS_WAIT_H 1
338 /* Define to 1 if you have the <time.h> header file. */
339 #define HAVE_TIME_H 1
341 /* Define to 1 if you have the `tzset' function. */
344 /* Define to 1 if you have the <unistd.h> header file. */
345 #define HAVE_UNISTD_H 1
347 /* Define to 1 if you have the `usleep' function. */
348 #define HAVE_USLEEP 1
350 /* Define to 1 if you have the `vfork' function. */
353 /* Define to 1 if you have the <vfork.h> header file. */
354 /* #undef HAVE_VFORK_H */
356 /* Define to 1 if you have the <windows.h> header file. */
357 /* #undef HAVE_WINDOWS_H */
359 /* Using Windows threads */
360 /* #undef HAVE_WINDOWS_THREADS */
362 /* Define to 1 if you have the <winsock2.h> header file. */
363 /* #undef HAVE_WINSOCK2_H */
365 /* Define to 1 if `fork' works. */
366 #define HAVE_WORKING_FORK 1
368 /* Define to 1 if `vfork' works. */
369 #define HAVE_WORKING_VFORK 1
371 /* Define to 1 if you have the `writev' function. */
372 #define HAVE_WRITEV 1
374 /* Define to 1 if you have the <ws2tcpip.h> header file. */
375 /* #undef HAVE_WS2TCPIP_H */
377 /* Define to 1 if you have the `_beginthreadex' function. */
378 /* #undef HAVE__BEGINTHREADEX */
380 /* if lex has yylex_destroy */
381 #define LEX_HAS_YYLEX_DESTROY 1
383 /* Define to the sub-directory in which libtool stores uninstalled libraries.
385 #define LT_OBJDIR ".libs/"
387 /* Define to the maximum message length to pass to syslog. */
388 #define MAXSYSLOGMSGLEN 10240
390 /* Define if memcmp() does not compare unsigned bytes */
391 /* #undef MEMCMP_IS_BROKEN */
393 /* Define if mkdir has one argument. */
394 /* #undef MKDIR_HAS_ONE_ARG */
396 /* Define if the network stack does not fully support nonblocking io (causes
397 lower performance). */
398 /* #undef NONBLOCKING_IS_BROKEN */
400 /* Put -D_ALL_SOURCE define in config.h */
401 /* #undef OMITTED__D_ALL_SOURCE */
403 /* Put -D_BSD_SOURCE define in config.h */
404 /* #undef OMITTED__D_BSD_SOURCE */
406 /* Put -D_GNU_SOURCE define in config.h */
407 /* #undef OMITTED__D_GNU_SOURCE */
409 /* Put -D_LARGEFILE_SOURCE=1 define in config.h */
410 /* #undef OMITTED__D_LARGEFILE_SOURCE_1 */
412 /* Put -D_POSIX_C_SOURCE=200112 define in config.h */
413 /* #undef OMITTED__D_POSIX_C_SOURCE_200112 */
415 /* Put -D_XOPEN_SOURCE=600 define in config.h */
416 /* #undef OMITTED__D_XOPEN_SOURCE_600 */
418 /* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
419 /* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */
421 /* Put -D__EXTENSIONS__ define in config.h */
422 /* #undef OMITTED__D__EXTENSIONS__ */
424 /* Define to the address where bug reports for this package should be sent. */
425 #define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl"
427 /* Define to the full name of this package. */
428 #define PACKAGE_NAME "unbound"
430 /* Define to the full name and version of this package. */
431 #define PACKAGE_STRING "unbound 1.4.20"
433 /* Define to the one symbol short name of this package. */
434 #define PACKAGE_TARNAME "unbound"
436 /* Define to the home page for this package. */
437 #define PACKAGE_URL ""
439 /* Define to the version of this package. */
440 #define PACKAGE_VERSION "1.4.20"
442 /* default pidfile location */
443 #define PIDFILE "/var/unbound/unbound.pid"
445 /* Define to necessary symbol if this constant uses a non-standard name on
447 /* #undef PTHREAD_CREATE_JOINABLE */
449 /* Define as the return type of signal handlers (`int' or `void'). */
450 #define RETSIGTYPE void
452 /* default rootkey location */
453 #define ROOT_ANCHOR_FILE "/var/unbound/root.key"
455 /* default rootcert location */
456 #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
458 /* version number for resource files */
459 #define RSRC_PACKAGE_VERSION 1,4,2,0
461 /* Directory to chdir to */
462 #define RUN_DIR "/var/unbound"
465 #define SHARE_DIR "/var/unbound"
467 /* Define to 1 if you have the ANSI C header files. */
468 #define STDC_HEADERS 1
470 /* use default strptime. */
471 #define STRPTIME_WORKS 1
473 /* Use win32 resources and API */
474 /* #undef UB_ON_WINDOWS */
476 /* default username */
477 #define UB_USERNAME "unbound"
479 /* use to enable lightweight alloc assertions, for debug use */
480 /* #undef UNBOUND_ALLOC_LITE */
482 /* use malloc not regions, for debug use */
483 /* #undef UNBOUND_ALLOC_NONREGIONAL */
485 /* use statistics for allocs and frees, for debug use */
486 /* #undef UNBOUND_ALLOC_STATS */
488 /* define this to enable debug checks. */
489 /* #undef UNBOUND_DEBUG */
491 /* Define this to enable ECDSA support. */
494 /* Define this to enable an EVP workaround for older openssl */
495 /* #undef USE_ECDSA_EVP_WORKAROUND */
497 /* Define this to enable GOST support. */
498 /* #undef USE_GOST */
500 /* Define if you want to use internal select based events */
501 #define USE_MINI_EVENT 1
503 /* Define this to enable SHA256 and SHA512 support. */
506 /* Enable extensions on AIX 3, Interix. */
508 # define _ALL_SOURCE 1
510 /* Enable GNU extensions on systems that have them. */
512 # define _GNU_SOURCE 1
514 /* Enable threading extensions on Solaris. */
515 #ifndef _POSIX_PTHREAD_SEMANTICS
516 # define _POSIX_PTHREAD_SEMANTICS 1
518 /* Enable extensions on HP NonStop. */
519 #ifndef _TANDEM_SOURCE
520 # define _TANDEM_SOURCE 1
522 /* Enable general extensions on Solaris. */
523 #ifndef __EXTENSIONS__
524 # define __EXTENSIONS__ 1
528 /* Whether the windows socket API is used */
529 /* #undef USE_WINSOCK */
531 /* the version of the windows API enabled */
532 #define WINVER 0x0502
534 /* Define if you want Python module. */
535 /* #undef WITH_PYTHONMODULE */
537 /* Define if you want PyUnbound. */
538 /* #undef WITH_PYUNBOUND */
540 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
542 #define YYTEXT_POINTER 1
544 /* Enable large inode numbers on Mac OS X 10.5. */
545 #ifndef _DARWIN_USE_64_BIT_INODE
546 # define _DARWIN_USE_64_BIT_INODE 1
549 /* Number of bits in a file offset, on hosts where this is settable. */
550 /* #undef _FILE_OFFSET_BITS */
552 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
553 /* #undef _LARGEFILE_SOURCE */
555 /* Define for large files, on AIX-style hosts. */
556 /* #undef _LARGE_FILES */
558 /* Define to 1 if on MINIX. */
561 /* Define to 2 if the system does not provide POSIX.1 features except with
563 /* #undef _POSIX_1_SOURCE */
565 /* Define to 1 if you need to in order for `stat' and other things to work. */
566 /* #undef _POSIX_SOURCE */
568 /* Define to empty if `const' does not conform to ANSI C. */
571 /* Define to `int' if <sys/types.h> doesn't define. */
575 /* #undef in_addr_t */
578 /* #undef in_port_t */
580 /* Define to `__inline__' or `__inline' if that's what the C compiler
581 calls it, or to nothing if 'inline' is not supported under any name. */
586 /* Define to `short' if <sys/types.h> does not define. */
589 /* Define to `int' if <sys/types.h> does not define. */
592 /* Define to `long long' if <sys/types.h> does not define. */
595 /* Define to `signed char' if <sys/types.h> does not define. */
598 /* Define if replacement function should be used. */
601 /* Define to `long int' if <sys/types.h> does not define. */
604 /* Define to `int' if <sys/types.h> does not define. */
607 /* Define to 'int' if not defined */
610 /* Define to `unsigned int' if <sys/types.h> does not define. */
613 /* Define to 'int' if not defined */
614 /* #undef socklen_t */
616 /* Define to `int' if <sys/types.h> does not define. */
619 /* Define to 'unsigned char if not defined */
622 /* Define to `int' if <sys/types.h> doesn't define. */
625 /* Define to `unsigned short' if <sys/types.h> does not define. */
626 /* #undef uint16_t */
628 /* Define to `unsigned int' if <sys/types.h> does not define. */
629 /* #undef uint32_t */
631 /* Define to `unsigned long long' if <sys/types.h> does not define. */
632 /* #undef uint64_t */
634 /* Define to `unsigned char' if <sys/types.h> does not define. */
637 /* Define as `fork' if `vfork' does not work. */
640 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
641 #define _GNU_SOURCE 1
644 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
645 #define _BSD_SOURCE 1
648 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
649 #define __EXTENSIONS__ 1
652 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
653 #define _POSIX_C_SOURCE 200112
656 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
657 #define _XOPEN_SOURCE 600
660 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
661 #define _XOPEN_SOURCE_EXTENDED 1
664 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
665 #define _ALL_SOURCE 1
668 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
669 #define _LARGEFILE_SOURCE 1
675 #ifndef UNBOUND_DEBUG
696 #include <sys/param.h>
699 #ifdef HAVE_SYS_SOCKET_H
700 #include <sys/socket.h>
703 #ifdef HAVE_SYS_UIO_H
707 #ifdef HAVE_NETINET_IN_H
708 #include <netinet/in.h>
711 #ifdef HAVE_ARPA_INET_H
712 #include <arpa/inet.h>
715 #ifdef HAVE_WINSOCK2_H
716 #include <winsock2.h>
719 #ifdef HAVE_WS2TCPIP_H
720 #include <ws2tcpip.h>
725 #ifdef HAVE_ATTR_FORMAT
726 # define ATTR_FORMAT(archetype, string_index, first_to_check) \
727 __attribute__ ((format (archetype, string_index, first_to_check)))
728 #else /* !HAVE_ATTR_FORMAT */
729 # define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
730 #endif /* !HAVE_ATTR_FORMAT */
734 # define ATTR_UNUSED(x) x
735 #elif defined(__cplusplus)
736 # define ATTR_UNUSED(x)
737 #elif defined(HAVE_ATTR_UNUSED)
738 # define ATTR_UNUSED(x) x __attribute__((unused))
739 #else /* !HAVE_ATTR_UNUSED */
740 # define ATTR_UNUSED(x) x
741 #endif /* !HAVE_ATTR_UNUSED */
747 #endif /* HAVE_FSEEKO */
750 #ifndef MAXHOSTNAMELEN
751 #define MAXHOSTNAMELEN 256
755 #ifndef HAVE_SNPRINTF
756 #define snprintf snprintf_unbound
757 #define vsnprintf vsnprintf_unbound
759 int snprintf (char *str, size_t count, const char *fmt, ...);
760 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
761 #endif /* HAVE_SNPRINTF */
764 #ifndef HAVE_INET_PTON
765 #define inet_pton inet_pton_unbound
766 int inet_pton(int af, const char* src, void* dst);
767 #endif /* HAVE_INET_PTON */
770 #ifndef HAVE_INET_NTOP
771 #define inet_ntop inet_ntop_unbound
772 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
776 #ifndef HAVE_INET_ATON
777 #define inet_aton inet_aton_unbound
778 int inet_aton(const char *cp, struct in_addr *addr);
783 #define memmove memmove_unbound
784 void *memmove(void *dest, const void *src, size_t n);
789 #define strlcpy strlcpy_unbound
790 size_t strlcpy(char *dst, const char *src, size_t siz);
794 #ifndef HAVE_GMTIME_R
795 #define gmtime_r gmtime_r_unbound
796 struct tm *gmtime_r(const time_t *timep, struct tm *result);
801 #define sleep(x) Sleep((x)*1000) /* on win32 */
802 #endif /* HAVE_SLEEP */
806 #define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
807 #endif /* HAVE_USLEEP */
811 #define random rand /* on win32, for tests only (bad random) */
812 #endif /* HAVE_RANDOM */
816 #define srandom(x) srand(x) /* on win32, for tests only (bad random) */
817 #endif /* HAVE_SRANDOM */
820 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
821 #ifdef HAVE_WINSOCK2_H
822 #define FD_SET_T (u_int)
829 #define IPV6_MIN_MTU 1280
830 #endif /* IPV6_MIN_MTU */
833 #ifdef MEMCMP_IS_BROKEN
834 #include "compat/memcmp.h"
835 #define memcmp memcmp_unbound
836 int memcmp(const void *x, const void *y, size_t n);
842 #define ctime_r unbound_ctime_r
843 char *ctime_r(const time_t *timep, char *buf);
846 #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
847 #define strptime unbound_strptime
849 char *strptime(const char *s, const char *format, struct tm *tm);
852 #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))
853 /* using version of libevent that is not threadsafe. */
854 # define LIBEVENT_SIGNAL_PROBLEM 1
857 #ifndef CHECKED_INET6
858 # define CHECKED_INET6
864 #endif /* CHECKED_INET6 */
866 /* maximum nesting of included files */
867 #define MAXINCLUDES 10
868 #ifndef HAVE_GETADDRINFO
869 struct sockaddr_storage;
870 #include "compat/fake-rfc2553.h"
873 #ifdef UNBOUND_ALLOC_STATS
874 # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
875 # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
876 # define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
877 # define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
878 void *unbound_stat_malloc(size_t size);
879 void *unbound_stat_calloc(size_t nmemb, size_t size);
880 void unbound_stat_free(void *ptr);
881 void *unbound_stat_realloc(void *ptr, size_t size);
882 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
884 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
885 int line, const char* func);
886 void unbound_stat_free_log(void *ptr, const char* file, int line,
888 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
889 int line, const char* func);
890 #elif defined(UNBOUND_ALLOC_LITE)
891 # include "util/alloc.h"
892 #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
894 /** default port for DNS traffic. */
895 #define UNBOUND_DNS_PORT 53
896 /** default port for unbound control traffic, registered port with IANA,
897 ub-dns-control 8953/tcp unbound dns nameserver control */
898 #define UNBOUND_CONTROL_PORT 8953
899 /** the version of unbound-control that this software implements */
900 #define UNBOUND_CONTROL_VERSION 1