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