config.h.in revision 1.1.1.6
1/* config.h.in.  Generated from configure.ac by autoheader.  */
2
3/* apply the noreturn attribute to a function that exits the program */
4#undef ATTR_NORETURN
5
6/* Define this to enable BIND8 like NSTATS & XSTATS. */
7#undef BIND8_STATS
8
9/* NSD default chroot directory */
10#undef CHROOTDIR
11
12/* NSD config dir */
13#undef CONFIGDIR
14
15/* Pathname to the NSD configuration file */
16#undef CONFIGFILE
17
18/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
19   */
20#undef DARWIN_BROKEN_SETREUID
21
22/* Pathname to the NSD database */
23#undef DBFILE
24
25/* default dnstap socket path */
26#undef DNSTAP_SOCKET_PATH
27
28/* Define to the default maximum message length with EDNS. */
29#undef EDNS_MAX_MESSAGE_LEN
30
31/* Define to the default facility for syslog. */
32#undef FACILITY
33
34/* Define to 1 if you have the `accept4' function. */
35#undef HAVE_ACCEPT4
36
37/* Define to 1 if you have the `alarm' function. */
38#undef HAVE_ALARM
39
40/* Define to 1 if you have the `arc4random' function. */
41#undef HAVE_ARC4RANDOM
42
43/* Define to 1 if you have the `arc4random_uniform' function. */
44#undef HAVE_ARC4RANDOM_UNIFORM
45
46/* Define to 1 if you have the <arpa/inet.h> header file. */
47#undef HAVE_ARPA_INET_H
48
49/* Whether the C compiler accepts the "format" attribute */
50#undef HAVE_ATTR_FORMAT
51
52/* Whether the C compiler accepts the "noreturn" attribute */
53#undef HAVE_ATTR_NORETURN
54
55/* Whether the C compiler accepts the "unused" attribute */
56#undef HAVE_ATTR_UNUSED
57
58/* Define to 1 if you have the `b64_ntop' function. */
59#undef HAVE_B64_NTOP
60
61/* Define to 1 if you have the `b64_pton' function. */
62#undef HAVE_B64_PTON
63
64/* Define to 1 if you have the `basename' function. */
65#undef HAVE_BASENAME
66
67/* Define to 1 if your system has a working `chown' function. */
68#undef HAVE_CHOWN
69
70/* Define to 1 if you have the `chroot' function. */
71#undef HAVE_CHROOT
72
73/* Define to 1 if you have the `clock_gettime' function. */
74#undef HAVE_CLOCK_GETTIME
75
76/* Define to 1 if you have the `CRYPTO_memcmp' function. */
77#undef HAVE_CRYPTO_MEMCMP
78
79/* if time.h provides ctime_r prototype */
80#undef HAVE_CTIME_R_PROTO
81
82/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
83   0 if you don't. */
84#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO
85
86/* Define to 1 if you have the declaration of `SSL_CTX_set_tmp_ecdh', and to 0
87   if you don't. */
88#undef HAVE_DECL_SSL_CTX_SET_TMP_ECDH
89
90/* Define to 1 if you have the `dup2' function. */
91#undef HAVE_DUP2
92
93/* Define to 1 if you have the `EC_KEY_new_by_curve_name' function. */
94#undef HAVE_EC_KEY_NEW_BY_CURVE_NAME
95
96/* Define to 1 if you have the <endian.h> header file. */
97#undef HAVE_ENDIAN_H
98
99/* Define to 1 if you have the `endpwent' function. */
100#undef HAVE_ENDPWENT
101
102/* Define to 1 if you have the `ERR_load_crypto_strings' function. */
103#undef HAVE_ERR_LOAD_CRYPTO_STRINGS
104
105/* Define to 1 if you have the `event_base_free' function. */
106#undef HAVE_EVENT_BASE_FREE
107
108/* Define to 1 if you have the `event_base_get_method' function. */
109#undef HAVE_EVENT_BASE_GET_METHOD
110
111/* Define to 1 if you have the `event_base_new' function. */
112#undef HAVE_EVENT_BASE_NEW
113
114/* Define to 1 if you have the `event_base_once' function. */
115#undef HAVE_EVENT_BASE_ONCE
116
117/* Define to 1 if you have the <event.h> header file. */
118#undef HAVE_EVENT_H
119
120/* Define to 1 if you have the `EVP_cleanup' function. */
121#undef HAVE_EVP_CLEANUP
122
123/* Define to 1 if you have the `ev_default_loop' function. */
124#undef HAVE_EV_DEFAULT_LOOP
125
126/* Define to 1 if you have the `ev_loop' function. */
127#undef HAVE_EV_LOOP
128
129/* Define to 1 if you have the <fcntl.h> header file. */
130#undef HAVE_FCNTL_H
131
132/* Define to 1 if you have the `fork' function. */
133#undef HAVE_FORK
134
135/* Define to 1 if you have the `freeaddrinfo' function. */
136#undef HAVE_FREEADDRINFO
137
138/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
139#undef HAVE_FSEEKO
140
141/* Define to 1 if you have the `gai_strerror' function. */
142#undef HAVE_GAI_STRERROR
143
144/* Define to 1 if you have the `getaddrinfo' function. */
145#undef HAVE_GETADDRINFO
146
147/* Define to 1 if you have the `gethostname' function. */
148#undef HAVE_GETHOSTNAME
149
150/* Define to 1 if you have the `getnameinfo' function. */
151#undef HAVE_GETNAMEINFO
152
153/* Define to 1 if you have the `getpwnam' function. */
154#undef HAVE_GETPWNAM
155
156/* Define to 1 if you have the `glob' function. */
157#undef HAVE_GLOB
158
159/* Define to 1 if you have the <glob.h> header file. */
160#undef HAVE_GLOB_H
161
162/* Define to 1 if you have the <grp.h> header file. */
163#undef HAVE_GRP_H
164
165/* Define to 1 if you have the `HMAC_CTX_new' function. */
166#undef HAVE_HMAC_CTX_NEW
167
168/* Define to 1 if you have the `HMAC_CTX_reset' function. */
169#undef HAVE_HMAC_CTX_RESET
170
171/* Define to 1 if you have the `inet_aton' function. */
172#undef HAVE_INET_ATON
173
174/* Define to 1 if you have the `inet_ntop' function. */
175#undef HAVE_INET_NTOP
176
177/* Define to 1 if you have the `inet_pton' function. */
178#undef HAVE_INET_PTON
179
180/* Define to 1 if you have the `initgroups' function. */
181#undef HAVE_INITGROUPS
182
183/* Define to 1 if you have the <inttypes.h> header file. */
184#undef HAVE_INTTYPES_H
185
186/* Define to 1 if you have the `crypto' library (-lcrypto). */
187#undef HAVE_LIBCRYPTO
188
189/* Define to 1 if you have the <limits.h> header file. */
190#undef HAVE_LIMITS_H
191
192/* Define to 1 if you have the `localtime_r' function. */
193#undef HAVE_LOCALTIME_R
194
195/* Define to 1 if you have the <login_cap.h> header file. */
196#undef HAVE_LOGIN_CAP_H
197
198/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
199   to 0 otherwise. */
200#undef HAVE_MALLOC
201
202/* Define to 1 if you have the `memcpy' function. */
203#undef HAVE_MEMCPY
204
205/* Define to 1 if you have the `memmove' function. */
206#undef HAVE_MEMMOVE
207
208/* Define to 1 if you have the <memory.h> header file. */
209#undef HAVE_MEMORY_H
210
211/* Define to 1 if you have the `memset' function. */
212#undef HAVE_MEMSET
213
214/* Define to 1 if you have the `mmap' function. */
215#undef HAVE_MMAP
216
217/* If sys/socket.h has a struct mmsghdr. */
218#undef HAVE_MMSGHDR
219
220/* Define to 1 if you have the `munmap' function. */
221#undef HAVE_MUNMAP
222
223/* Define to 1 if you have the <netdb.h> header file. */
224#undef HAVE_NETDB_H
225
226/* Define to 1 if you have the <netinet/in.h> header file. */
227#undef HAVE_NETINET_IN_H
228
229/* Define to 1 if you have the <netinet/tcp.h> header file. */
230#undef HAVE_NETINET_TCP_H
231
232/* Define to 1 if you have the <openssl/err.h> header file. */
233#undef HAVE_OPENSSL_ERR_H
234
235/* Define to 1 if you have the `OPENSSL_init_crypto' function. */
236#undef HAVE_OPENSSL_INIT_CRYPTO
237
238/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
239#undef HAVE_OPENSSL_INIT_SSL
240
241/* Define to 1 if you have the <openssl/ocsp.h> header file. */
242#undef HAVE_OPENSSL_OCSP_H
243
244/* Define to 1 if you have the <openssl/rand.h> header file. */
245#undef HAVE_OPENSSL_RAND_H
246
247/* Define to 1 if you have the <openssl/ssl.h> header file. */
248#undef HAVE_OPENSSL_SSL_H
249
250/* Define to 1 if you have the `ppoll' function. */
251#undef HAVE_PPOLL
252
253/* Define to 1 if you have the `pselect' function. */
254#undef HAVE_PSELECT
255
256/* if sys/select.h provides pselect prototype */
257#undef HAVE_PSELECT_PROTO
258
259/* Define to 1 if you have the `pwrite' function. */
260#undef HAVE_PWRITE
261
262/* If we have reallocarray(3) */
263#undef HAVE_REALLOCARRAY
264
265/* Define if recvmmsg is implemented */
266#undef HAVE_RECVMMSG
267
268/* Define if sendmmsg is implemented */
269#undef HAVE_SENDMMSG
270
271/* Define to 1 if you have the `setregid' function. */
272#undef HAVE_SETREGID
273
274/* Define to 1 if you have the `setresgid' function. */
275#undef HAVE_SETRESGID
276
277/* Define to 1 if you have the `setresuid' function. */
278#undef HAVE_SETRESUID
279
280/* Define to 1 if you have the `setreuid' function. */
281#undef HAVE_SETREUID
282
283/* Define to 1 if you have the `setusercontext' function. */
284#undef HAVE_SETUSERCONTEXT
285
286/* Define to 1 if you have the `sigaction' function. */
287#undef HAVE_SIGACTION
288
289/* Define to 1 if you have the <signal.h> header file. */
290#undef HAVE_SIGNAL_H
291
292/* Define to 1 if you have the `sigprocmask' function. */
293#undef HAVE_SIGPROCMASK
294
295/* Define to 1 if you have the `snprintf' function. */
296#undef HAVE_SNPRINTF
297
298/* Define to 1 if you have the `socket' function. */
299#undef HAVE_SOCKET
300
301/* Define if you have the SSL libraries installed. */
302#undef HAVE_SSL
303
304/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
305#undef HAVE_SSL_CTX_SET_SECURITY_LEVEL
306
307/* Define to 1 if you have the <stdarg.h> header file. */
308#undef HAVE_STDARG_H
309
310/* Define to 1 if you have the <stddef.h> header file. */
311#undef HAVE_STDDEF_H
312
313/* Define to 1 if you have the <stdint.h> header file. */
314#undef HAVE_STDINT_H
315
316/* Define to 1 if you have the <stdlib.h> header file. */
317#undef HAVE_STDLIB_H
318
319/* Define to 1 if you have the `strcasecmp' function. */
320#undef HAVE_STRCASECMP
321
322/* Define to 1 if you have the `strchr' function. */
323#undef HAVE_STRCHR
324
325/* Define to 1 if you have the `strdup' function. */
326#undef HAVE_STRDUP
327
328/* Define to 1 if you have the `strerror' function. */
329#undef HAVE_STRERROR
330
331/* Define to 1 if you have the `strftime' function. */
332#undef HAVE_STRFTIME
333
334/* Define to 1 if you have the <strings.h> header file. */
335#undef HAVE_STRINGS_H
336
337/* Define to 1 if you have the <string.h> header file. */
338#undef HAVE_STRING_H
339
340/* Define to 1 if you have the `strlcat' function. */
341#undef HAVE_STRLCAT
342
343/* Define to 1 if you have the `strlcpy' function. */
344#undef HAVE_STRLCPY
345
346/* Define to 1 if you have the `strncasecmp' function. */
347#undef HAVE_STRNCASECMP
348
349/* Define to 1 if you have the `strptime' function. */
350#undef HAVE_STRPTIME
351
352/* Define to 1 if you have the `strtol' function. */
353#undef HAVE_STRTOL
354
355/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
356#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
357
358/* Define to 1 if `st_mtimensec' is a member of `struct stat'. */
359#undef HAVE_STRUCT_STAT_ST_MTIMENSEC
360
361/* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */
362#undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
363
364/* If time.h has a struct timespec (for pselect). */
365#undef HAVE_STRUCT_TIMESPEC
366
367/* Define to 1 if you have the <syslog.h> header file. */
368#undef HAVE_SYSLOG_H
369
370/* Define to 1 if you have the <sys/bitypes.h> header file. */
371#undef HAVE_SYS_BITYPES_H
372
373/* Define to 1 if you have the <sys/mman.h> header file. */
374#undef HAVE_SYS_MMAN_H
375
376/* Define to 1 if you have the <sys/param.h> header file. */
377#undef HAVE_SYS_PARAM_H
378
379/* Define to 1 if you have the <sys/select.h> header file. */
380#undef HAVE_SYS_SELECT_H
381
382/* Define to 1 if you have the <sys/socket.h> header file. */
383#undef HAVE_SYS_SOCKET_H
384
385/* Define to 1 if you have the <sys/stat.h> header file. */
386#undef HAVE_SYS_STAT_H
387
388/* Define to 1 if you have the <sys/types.h> header file. */
389#undef HAVE_SYS_TYPES_H
390
391/* Define to 1 if you have the <sys/un.h> header file. */
392#undef HAVE_SYS_UN_H
393
394/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
395#undef HAVE_SYS_WAIT_H
396
397/* Define to 1 if you have the <tcpd.h> header file. */
398#undef HAVE_TCPD_H
399
400/* Define to 1 if you have the <time.h> header file. */
401#undef HAVE_TIME_H
402
403/* Define to 1 if you have the `tzset' function. */
404#undef HAVE_TZSET
405
406/* Define to 1 if you have the <unistd.h> header file. */
407#undef HAVE_UNISTD_H
408
409/* Define this if you have double va_list definitions. */
410#undef HAVE_VA_LIST_DOUBLE_DEF
411
412/* Define to 1 if you have the `vfork' function. */
413#undef HAVE_VFORK
414
415/* Define to 1 if you have the <vfork.h> header file. */
416#undef HAVE_VFORK_H
417
418/* Define to 1 if `fork' works. */
419#undef HAVE_WORKING_FORK
420
421/* Define to 1 if `vfork' works. */
422#undef HAVE_WORKING_VFORK
423
424/* Define to 1 if you have the `writev' function. */
425#undef HAVE_WRITEV
426
427/* Define to the default nsd identity. */
428#undef IDENTITY
429
430/* Define this to enable IPv6 support. */
431#undef INET6
432
433/* If flex defines yy_current_buffer as a macro */
434#undef LEX_DEFINES_YY_CURRENT_BUFFER
435
436/* Define to the maximum message length to pass to syslog. */
437#undef MAXSYSLOGMSGLEN
438
439/* Define this to cleanup memory at exit (eg. for valgrind, etc.) */
440#undef MEMCLEAN
441
442/* Define if memcmp() does not compare unsigned bytes */
443#undef MEMCMP_IS_BROKEN
444
445/* Define this to enable response minimalization to reduce truncation. */
446#undef MINIMAL_RESPONSES
447
448/* Define if mkdir has one argument. */
449#undef MKDIR_HAS_ONE_ARG
450
451/* Undefine this to enable internal runtime checks. */
452#undef NDEBUG
453
454/* Define if the network stack does not fully support nonblocking io (causes
455   lower performance). */
456#undef NONBLOCKING_IS_BROKEN
457
458/* Define to the default nsd-control port. */
459#undef NSD_CONTROL_PORT
460
461/* Define to nsd-control proto version. */
462#undef NSD_CONTROL_VERSION
463
464/* Pathname to start nsd from nsd-control */
465#undef NSD_START_PATH
466
467/* Define this to enable NSEC3 support. */
468#undef NSEC3
469
470/* Define to the address where bug reports for this package should be sent. */
471#undef PACKAGE_BUGREPORT
472
473/* Define to the full name of this package. */
474#undef PACKAGE_NAME
475
476/* Define to the full name and version of this package. */
477#undef PACKAGE_STRING
478
479/* Define to the one symbol short name of this package. */
480#undef PACKAGE_TARNAME
481
482/* Define to the home page for this package. */
483#undef PACKAGE_URL
484
485/* Define to the version of this package. */
486#undef PACKAGE_VERSION
487
488/* Define this to use packed structure alignment. */
489#undef PACKED_STRUCTS
490
491/* Pathname to the NSD pidfile */
492#undef PIDFILE
493
494/* Define this to enable rate limiting. */
495#undef RATELIMIT
496
497/* Define this to set ratelimit to off by default. */
498#undef RATELIMIT_DEFAULT_OFF
499
500/* Define as the return type of signal handlers (`int' or `void'). */
501#undef RETSIGTYPE
502
503/* Define this to configure as a root server. */
504#undef ROOT_SERVER
505
506/* The size of `off_t', as computed by sizeof. */
507#undef SIZEOF_OFF_T
508
509/* The size of `void*', as computed by sizeof. */
510#undef SIZEOF_VOIDP
511
512/* Define to 1 if you have the ANSI C header files. */
513#undef STDC_HEADERS
514
515/* strptime is available from time.h with some defines. */
516#undef STRPTIME_NEEDS_DEFINES
517
518/* use default strptime. */
519#undef STRPTIME_WORKS
520
521/* Define to the backlog to be used with listen. */
522#undef TCP_BACKLOG
523
524/* Define to the default maximum message length. */
525#undef TCP_MAX_MESSAGE_LEN
526
527/* Define to the default tcp port. */
528#undef TCP_PORT
529
530/* Define to the default tcp timeout. */
531#undef TCP_TIMEOUT
532
533/* Define to the default DNS over TLS port. */
534#undef TLS_PORT
535
536/* Define to the default maximum udp message length. */
537#undef UDP_MAX_MESSAGE_LEN
538
539/* Define to the default udp port. */
540#undef UDP_PORT
541
542/* the user name to drop privileges to */
543#undef USER
544
545/* Define to 1 to enable dnstap support */
546#undef USE_DNSTAP
547
548/* Define if you want to use internal select based events */
549#undef USE_MINI_EVENT
550
551/* Define this to enable mmap instead of malloc. Experimental. */
552#undef USE_MMAP_ALLOC
553
554/* Define this to configure to use the radix tree. */
555#undef USE_RADIX_TREE
556
557/* Enable extensions on AIX 3, Interix.  */
558#ifndef _ALL_SOURCE
559# undef _ALL_SOURCE
560#endif
561/* Enable GNU extensions on systems that have them.  */
562#ifndef _GNU_SOURCE
563# undef _GNU_SOURCE
564#endif
565/* Enable threading extensions on Solaris.  */
566#ifndef _POSIX_PTHREAD_SEMANTICS
567# undef _POSIX_PTHREAD_SEMANTICS
568#endif
569/* Enable extensions on HP NonStop.  */
570#ifndef _TANDEM_SOURCE
571# undef _TANDEM_SOURCE
572#endif
573/* Enable general extensions on Solaris.  */
574#ifndef __EXTENSIONS__
575# undef __EXTENSIONS__
576#endif
577
578
579/* Define this to enable TCP fast open. */
580#undef USE_TCP_FASTOPEN
581
582/* Define this to enable per-zone statistics gathering. */
583#undef USE_ZONE_STATS
584
585/* Define to the NSD version to answer version.server query. */
586#undef VERSION
587
588/* Pathname to the NSD xfrd zone timer state file. */
589#undef XFRDFILE
590
591/* Pathname to where the NSD transfer dir is created. */
592#undef XFRDIR
593
594/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
595   `char[]'. */
596#undef YYTEXT_POINTER
597
598/* Pathname to the NSD zone list file. */
599#undef ZONELISTFILE
600
601/* NSD default location for zone files. Empty string or NULL to disable. */
602#undef ZONESDIR
603
604/* Enable large inode numbers on Mac OS X 10.5.  */
605#ifndef _DARWIN_USE_64_BIT_INODE
606# define _DARWIN_USE_64_BIT_INODE 1
607#endif
608
609/* Number of bits in a file offset, on hosts where this is settable. */
610#undef _FILE_OFFSET_BITS
611
612/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
613#undef _LARGEFILE_SOURCE
614
615/* Define for large files, on AIX-style hosts. */
616#undef _LARGE_FILES
617
618/* Define to 1 if on MINIX. */
619#undef _MINIX
620
621/* Enable for compile on Minix */
622#undef _NETBSD_SOURCE
623
624/* Define to 2 if the system does not provide POSIX.1 features except with
625   this defined. */
626#undef _POSIX_1_SOURCE
627
628/* Define to 1 if you need to in order for `stat' and other things to work. */
629#undef _POSIX_SOURCE
630
631/* Define to empty if `const' does not conform to ANSI C. */
632#undef const
633
634/* Define to `int' if <sys/types.h> doesn't define. */
635#undef gid_t
636
637/* in_addr_t */
638#undef in_addr_t
639
640/* Define to `__inline__' or `__inline' if that's what the C compiler
641   calls it, or to nothing if 'inline' is not supported under any name.  */
642#ifndef __cplusplus
643#undef inline
644#endif
645
646/* Define "int16_t" to "short" if "int16_t" is missing */
647#undef int16_t
648
649/* Define "int32_t" to "int" if "int32_t" is missing */
650#undef int32_t
651
652/* Define "int64_t" to "long long" if "int64_t" is missing */
653#undef int64_t
654
655/* Define "int8_t" to "char" if "int8_t" is missing */
656#undef int8_t
657
658/* Define to rpl_malloc if the replacement function should be used. */
659#undef malloc
660
661/* Define to `long int' if <sys/types.h> does not define. */
662#undef off_t
663
664/* Define to `int' if <sys/types.h> does not define. */
665#undef pid_t
666
667/* Define "sig_atomic_t" to "int" if "sig_atomic_t" is missing */
668#undef sig_atomic_t
669
670/* Define to `unsigned int' if <sys/types.h> does not define. */
671#undef size_t
672
673/* Define "socklen_t" to "int" if "socklen_t" is missing */
674#undef socklen_t
675
676/* Fallback member name for socket family in struct sockaddr_storage */
677#undef ss_family
678
679/* Define "ssize_t" to "int" if "ssize_t" is missing */
680#undef ssize_t
681
682/* Define "suseconds_t" to "time_t" if "suseconds_t" is missing */
683#undef suseconds_t
684
685/* Define to `int' if <sys/types.h> doesn't define. */
686#undef uid_t
687
688/* Define "uint16_t" to "unsigned short" if "uint16_t" is missing */
689#undef uint16_t
690
691/* Define "uint32_t" to "unsigned int" if "uint32_t" is missing */
692#undef uint32_t
693
694/* Define "uint64_t" to "unsigned long long" if "uint64_t" is missing */
695#undef uint64_t
696
697/* Define "uint8_t" to "unsigned char" if "uint8_t" is missing */
698#undef uint8_t
699
700/* Define "uintptr_t" to "void*" if "uintptr_t" is missing */
701#undef uintptr_t
702
703/* Define as `fork' if `vfork' does not work. */
704#undef vfork
705
706
707/* define before includes as it specifies what standard to use. */
708#if (defined(HAVE_PSELECT) && !defined (HAVE_PSELECT_PROTO)) \
709	|| !defined (HAVE_CTIME_R_PROTO) \
710	|| defined (STRPTIME_NEEDS_DEFINES)
711#  ifndef _XOPEN_SOURCE
712#    define _XOPEN_SOURCE 600
713#  endif
714#  ifndef _POSIX_C_SOURCE
715#    define _POSIX_C_SOURCE 200112
716#  endif
717#  ifndef _BSD_SOURCE
718#    define _BSD_SOURCE 1
719#  endif
720#  ifndef _OPENBSD_SOURCE
721#    define _OPENBSD_SOURCE 1
722#  endif
723#  ifndef _DEFAULT_SOURCE
724#    define _DEFAULT_SOURCE 1
725#  endif
726#  ifndef __EXTENSIONS__
727#    define __EXTENSIONS__ 1
728#  endif 
729#  ifndef _STDC_C99
730#    define _STDC_C99 1
731#  endif
732#  ifndef _ALL_SOURCE
733#    define _ALL_SOURCE 1
734#  endif
735#endif
736
737
738
739#ifdef HAVE_VA_LIST_DOUBLE_DEF
740/* workaround double va_list definition on some platforms */
741#  ifndef _VA_LIST_DEFINED
742#    define _VA_LIST_DEFINED
743#  endif
744#endif
745
746
747
748#include <sys/types.h>
749#if STDC_HEADERS
750#include <stdlib.h>
751#include <stddef.h>
752#endif
753
754#ifdef HAVE_TIME_H
755#include <time.h>
756#endif
757
758#ifdef HAVE_STDINT_H
759#include <stdint.h>
760#endif
761
762#ifdef HAVE_SYS_SOCKET_H
763#include <sys/socket.h>
764#endif
765
766#ifdef HAVE_NETINET_IN_H
767#include <netinet/in.h>
768#endif
769
770#ifdef HAVE_NETINET_TCP_H
771#include <netinet/tcp.h>
772#endif
773
774#ifdef HAVE_ARPA_INET_H
775#include <arpa/inet.h>
776#endif
777
778/* For Tru64 */
779#ifdef HAVE_SYS_BITYPES_H
780#include <sys/bitypes.h>
781#endif
782
783
784
785#ifdef HAVE_ATTR_FORMAT
786#define ATTR_FORMAT(archetype, string_index, first_to_check) \
787    __attribute__ ((format (archetype, string_index, first_to_check)))
788#else /* !HAVE_ATTR_FORMAT */
789#define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
790#endif /* !HAVE_ATTR_FORMAT */
791#if defined(__cplusplus)
792#define ATTR_UNUSED(x)
793#elif defined(HAVE_ATTR_UNUSED)
794#define ATTR_UNUSED(x)  x __attribute__((unused))
795#else /* !HAVE_ATTR_UNUSED */
796#define ATTR_UNUSED(x)  x
797#endif /* !HAVE_ATTR_UNUSED */
798
799
800
801#ifndef IPV6_MIN_MTU
802#define IPV6_MIN_MTU 1280
803#endif /* IPV6_MIN_MTU */
804
805#ifndef AF_INET6
806#define AF_INET6	28
807#endif /* AF_INET6 */
808
809
810
811/* maximum nesting of included files */
812#define MAXINCLUDES 10
813
814
815
816#ifndef HAVE_B64_NTOP
817int b64_ntop(uint8_t const *src, size_t srclength,
818	     char *target, size_t targsize);
819#endif /* !HAVE_B64_NTOP */
820#ifndef HAVE_B64_PTON
821int b64_pton(char const *src, uint8_t *target, size_t targsize);
822#endif /* !HAVE_B64_PTON */
823#ifndef HAVE_FSEEKO
824#define fseeko fseek
825#define ftello ftell
826#endif /* HAVE_FSEEKO */
827#ifndef HAVE_SNPRINTF
828#include <stdarg.h>
829int snprintf (char *str, size_t count, const char *fmt, ...);
830int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
831#endif /* HAVE_SNPRINTF */
832#ifndef HAVE_INET_PTON
833int inet_pton(int af, const char* src, void* dst);
834#endif /* HAVE_INET_PTON */
835#ifndef HAVE_INET_NTOP
836const char *inet_ntop(int af, const void *src, char *dst, size_t size);
837#endif
838#ifndef HAVE_INET_ATON
839int inet_aton(const char *cp, struct in_addr *addr);
840#endif
841#ifndef HAVE_MEMMOVE
842void *memmove(void *dest, const void *src, size_t n);
843#endif
844#ifndef HAVE_STRLCAT
845size_t strlcat(char *dst, const char *src, size_t siz);
846#endif
847#ifndef HAVE_STRLCPY
848size_t strlcpy(char *dst, const char *src, size_t siz);
849#endif
850#ifndef HAVE_REALLOCARRAY
851void* reallocarray(void *ptr, size_t nmemb, size_t size);
852#endif
853#ifndef HAVE_GETADDRINFO
854#include "compat/fake-rfc2553.h"
855#endif
856#ifndef HAVE_STRPTIME
857#define HAVE_STRPTIME 1
858char *strptime(const char *s, const char *format, struct tm *tm); 
859#endif
860#ifndef STRPTIME_WORKS
861#define STRPTIME_WORKS 1
862char *nsd_strptime(const char *s, const char *format, struct tm *tm); 
863#define strptime(a,b,c) nsd_strptime((a),(b),(c))
864#endif
865
866
867
868#ifdef MEMCMP_IS_BROKEN
869#include "compat/memcmp.h"
870#define memcmp memcmp_nsd
871int memcmp(const void *x, const void *y, size_t n);
872#endif
873
874
875#ifndef MAXHOSTNAMELEN
876#define MAXHOSTNAMELEN 256
877#endif
878
879
880
881
882
883/* provide timespec def if not available */
884#ifndef CONFIG_DEFINES
885#define CONFIG_DEFINES
886#ifndef HAVE_STRUCT_TIMESPEC
887#ifndef __timespec_defined
888#define __timespec_defined 1
889	struct timespec {
890		long    tv_sec;         /* seconds */
891		long    tv_nsec;        /* nanoseconds */
892	};
893#endif /* !__timespec_defined */
894#endif /* !HAVE_STRUCT_TIMESPEC */
895#endif /* !CONFIG_DEFINES */
896
897#ifdef PACKED_STRUCTS
898#define ATTR_PACKED __attribute__((packed))
899#else
900#define ATTR_PACKED
901#endif
902
903