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