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