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