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