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