6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer/*
9eb24f1f84885d5c2e51a7f675264db398c31af7Tinderbox User * Copyright (C) 1999-2001, 2004, 2006-2009, 2011-2018 Internet Systems Consortium, Inc. ("ISC")
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer */
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer/*
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer * win32 configuration file
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer * All definitions, declarations, macros and includes are
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer * specific to the requirements of the Windows NT and Windows 2000
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer * platforms
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define to empty if the keyword does not work. */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef const */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define as __inline if that's what the C compiler calls it. */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence#define inline __inline
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Define to `unsigned int/__int64' if <sys/types.h> doesn't define. */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef size_t */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer/*
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer * ANSI C compliance enabled
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define __STDC__ 1
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
667c498942c0e605c1aab98bca6b90aac4cbbd71Mark Andrews/*
667c498942c0e605c1aab98bca6b90aac4cbbd71Mark Andrews * Silence compiler warnings about using strcpy and friends.
667c498942c0e605c1aab98bca6b90aac4cbbd71Mark Andrews */
667c498942c0e605c1aab98bca6b90aac4cbbd71Mark Andrews#define _CRT_SECURE_NO_DEPRECATE 1
667c498942c0e605c1aab98bca6b90aac4cbbd71Mark Andrews
667c498942c0e605c1aab98bca6b90aac4cbbd71Mark Andrews/*
667c498942c0e605c1aab98bca6b90aac4cbbd71Mark Andrews * Use 32 bit time.
667c498942c0e605c1aab98bca6b90aac4cbbd71Mark Andrews */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#ifndef _WIN64
667c498942c0e605c1aab98bca6b90aac4cbbd71Mark Andrews#define _USE_32BIT_TIME_T 1
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
667c498942c0e605c1aab98bca6b90aac4cbbd71Mark Andrews
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer/*
36e97eb661df71069df2d75f5fd3b5bb0dcf1efeMark Andrews * Minimum version is Windows XP
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#ifndef _WIN32_WINNT
36e97eb661df71069df2d75f5fd3b5bb0dcf1efeMark Andrews#define _WIN32_WINNT 0x0501
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#if _WIN32_WINNT < 0x0501
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#error Minimum Target environment is Windows XP and Windows Server 2003
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#ifndef NTDDI_VERSION
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#define NTDDI_VERSION 0x05010100
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#if NTDDI_VERSION < 0x05010100
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#error Minimum Target environment is Windows XP SP1 and Windows Server 2003
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
e7c38ca9635e73c9a928bbab9c73c2abbd499f8bEvan Hunt
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define if you have the ANSI C header files. */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence#define STDC_HEADERS 1
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define if you can safely include both <sys/time.h> and <time.h>. */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence#define TIME_WITH_SYS_TIME 1
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* define on DEC OSF to enable 4.4BSD style sa_len support */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef _SOCKADDR_LEN */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* define if your system needs pthread_init() before using pthreads */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef NEED_PTHREAD_INIT */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* define if your system has sigwait() */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef HAVE_SIGWAIT */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* define on Solaris to get sigwait() to work using pthreads semantics */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef _POSIX_PTHREAD_SEMANTICS */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* define if LinuxThreads is in use */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef HAVE_LINUXTHREADS */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* define if catgets() is available */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef HAVE_CATGETS */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* define if you have the NET_RT_IFLIST sysctl variable. */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence#define HAVE_IFLIST_SYSCTL 1
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* define if you need to #define _XPG4_2 before including sys/socket.h */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef NEED_XPG4_2_BEFORE_SOCKET_H */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* define if you need to #define _XOPEN_SOURCE_ENTENDED before including
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * sys/socket.h
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef NEED_XSE_BEFORE_SOCKET_H */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define if you have the <fcntl.h> header file. */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence#define HAVE_FCNTL_H 1
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define if you have the <sys/sockio.h> header file. */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence#define HAVE_SYS_SOCKIO_H 1
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define if you have the <sys/time.h> header file. */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence#define HAVE_SYS_TIME_H 1
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define if you have the <unistd.h> header file. */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence#define HAVE_UNISTD_H 1
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define if you have the c_r library (-lc_r). */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef HAVE_LIBC_R */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define if you have the nsl library (-lnsl). */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef HAVE_LIBNSL */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define if you have the pthread library (-lpthread). */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef HAVE_LIBPTHREAD */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* Define if you have the socket library (-lsocket). */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* #undef HAVE_LIBSOCKET */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer/* Define if you have h_errno */
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer#define HAVE_H_ERRNO
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer
ecffc3aae3e72c5c65b1911ec3f4e1d180dc4bbcMark Andrews/* Define if you have RSA_generate_key(). */
ecffc3aae3e72c5c65b1911ec3f4e1d180dc4bbcMark Andrews#define HAVE_RSA_GENERATE_KEY
ecffc3aae3e72c5c65b1911ec3f4e1d180dc4bbcMark Andrews
ecffc3aae3e72c5c65b1911ec3f4e1d180dc4bbcMark Andrews/* Define if you have DSA_generate_parameters(). */
ecffc3aae3e72c5c65b1911ec3f4e1d180dc4bbcMark Andrews#define HAVE_DSA_GENERATE_PARAMETERS
ecffc3aae3e72c5c65b1911ec3f4e1d180dc4bbcMark Andrews
ecffc3aae3e72c5c65b1911ec3f4e1d180dc4bbcMark Andrews/* Define if you have DH_generate_parameters(). */
ecffc3aae3e72c5c65b1911ec3f4e1d180dc4bbcMark Andrews#define HAVE_DH_GENERATE_PARAMETERS
ecffc3aae3e72c5c65b1911ec3f4e1d180dc4bbcMark Andrews
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt/* Define if you have getpassphrase in the C library. */
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt#define HAVE_GETPASSPHRASE
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Huntchar *getpassphrase(const char *);
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
422009fe5b15e31e7f5d09212bd1480121a1464eEvan Hunt/*
422009fe5b15e31e7f5d09212bd1480121a1464eEvan Hunt * Define to 1 if you want to use the DLZ "dlopen" driver
422009fe5b15e31e7f5d09212bd1480121a1464eEvan Hunt * (which has the same name on windows even though it uses
422009fe5b15e31e7f5d09212bd1480121a1464eEvan Hunt * LoadLibrary() instead of dlopen()).
422009fe5b15e31e7f5d09212bd1480121a1464eEvan Hunt */
422009fe5b15e31e7f5d09212bd1480121a1464eEvan Hunt#define ISC_DLZ_DLOPEN 1
422009fe5b15e31e7f5d09212bd1480121a1464eEvan Hunt
07555e64d9102eae058efd58f872b4a3b9ddff61Mark Andrews#define WANT_IPV6
578f588228f5e04ccf648b6ae596f396ad6a22c9Mark Andrews
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IFMT _S_IFMT /* file type mask */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IFDIR _S_IFDIR /* directory */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IFCHR _S_IFCHR /* character special */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IFIFO _S_IFIFO /* pipe */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IFREG _S_IFREG /* regular */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IREAD _S_IREAD /* read permission, owner */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IWRITE _S_IWRITE /* write permission, owner */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IEXEC _S_IEXEC /* execute/search permission, owner */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define O_RDONLY _O_RDONLY
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define O_WRONLY _O_WRONLY
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define O_RDWR _O_RDWR
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define O_APPEND _O_APPEND
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define O_CREAT _O_CREAT
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define O_TRUNC _O_TRUNC
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define O_EXCL _O_EXCL
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer/* open() under unix allows setting of read/write permissions
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer * at the owner, group and other levels. These don't exist in NT
a687db7ce86c97d884b7ee1a68f59fcddf4d1c2aAutomatic Updater * We'll just map them all to the NT equivalent
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IRUSR _S_IREAD /* Owner read permission */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IWUSR _S_IWRITE /* Owner write permission */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IRGRP _S_IREAD /* Group read permission */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IWGRP _S_IWRITE /* Group write permission */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IROTH _S_IREAD /* Other read permission */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define S_IWOTH _S_IWRITE /* Other write permission */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/*
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * WIN32 specials until some other way of dealing with these is decided.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
4d6329c1b3c80f82880291ae35f68f84c14ad820Francis Dupont#if _MSC_VER < 1900
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define snprintf _snprintf
4d6329c1b3c80f82880291ae35f68f84c14ad820Francis Dupont#endif
36e97eb661df71069df2d75f5fd3b5bb0dcf1efeMark Andrews#if _MSC_VER <= 1400
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define vsnprintf _vsnprintf
36e97eb661df71069df2d75f5fd3b5bb0dcf1efeMark Andrews#endif
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define strcasecmp _stricmp
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define strncasecmp _strnicmp
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define strdup _strdup
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define sopen _sopen
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define isascii __isascii
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#ifndef _WIN64
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define stat _stat
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define fstat _fstat
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#else
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#define stat _stat64
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#define fstat _fstat64
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define fileno _fileno
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define unlink _unlink
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define chdir _chdir
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define mkdir _mkdir
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#define rmdir _rmdir
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define getcwd _getcwd
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define utime _utime
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define utimbuf _utimbuf
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#ifndef _WIN64
c213258356638f9af1e1c68425df527b856567a2Francis Dupont#define lseek _lseek
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#else
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#define lseek _lseeki64
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
6fa7a247a1037be08d7a8e0b4c4fd3785b2f268cAndreas Gustafsson/* #define EAFNOSUPPORT EINVAL */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define chmod _chmod
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define getpid _getpid
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define getppid _getpid /* WARNING!!! For now this gets the same pid */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define random rand /* Random number generator */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define srandom srand /* Random number generator seeding */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence/* for the config file */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencetypedef unsigned int uid_t; /* user id */
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencetypedef unsigned int gid_t; /* group id */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayertypedef long pid_t; /* PID */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#ifndef _WIN64
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayertypedef int ssize_t;
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayertypedef long off_t;
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#else
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewstypedef __int64 ssize_t;
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#ifndef _AFX
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* BINDInstall defines it with another type but doesn't use it */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewstypedef __int64 off_t;
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer/*
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer * Set up the Version Information
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#include <versions.h>
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
a687db7ce86c97d884b7ee1a68f59fcddf4d1c2aAutomatic Updater/* We actually are using the CryptAPI and not a device */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define PATH_RANDOMDEV "CryptAPI"
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#include <stddef.h>
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#include <stdio.h>
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#include <stdarg.h>
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer/*
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer * Applications may need to get the configuration path
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer */
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer#ifndef _USRDLL
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer#include <isc/ntpaths.h>
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer#endif
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define fdopen _fdopen
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define read _read
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define open _open
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define close _close
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define write _write
90039392500d15bf056ab4505d048fcba0d485dfMark Andrews#include <io.h>
b39213ce599dc433c6f99144c97ca3d562f40344Mark Andrews#define isatty _isatty
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#ifndef _WINSOCKAPI_
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#endif
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer/*
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer * Make the number of available sockets large
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer * The number of sockets needed can get large and memory's cheap
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer * This must be defined before winsock2.h gets included as the
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer * macro is used there.
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer */
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#ifndef FD_SETSIZE
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#define FD_SETSIZE 16384
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer#include <windows.h>
22d44896ad30af27f7b483a806d1452daf5451c2Mark Andrews
22d44896ad30af27f7b483a806d1452daf5451c2Mark Andrews/*
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews * main() is hooked
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#define ISC_MAIN_HOOK 1
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/*
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews * Configure sensible arguments
22d44896ad30af27f7b483a806d1452daf5451c2Mark Andrews */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@CONFIGARGS@
aeff7de836558fa8002ab5db35292d2bb6450da8Evan Hunt
aeff7de836558fa8002ab5db35292d2bb6450da8Evan Hunt/*
aeff7de836558fa8002ab5db35292d2bb6450da8Evan Hunt * Define if libxml2 is present
aeff7de836558fa8002ab5db35292d2bb6450da8Evan Hunt */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_LIBXML2@
e7c38ca9635e73c9a928bbab9c73c2abbd499f8bEvan Hunt
503e5aa8d2400e47c9617db10b57f2d4f3495fd2Mark Andrews/** define if struct addrinfo exists */
503e5aa8d2400e47c9617db10b57f2d4f3495fd2Mark Andrews#define HAVE_ADDRINFO
503e5aa8d2400e47c9617db10b57f2d4f3495fd2Mark Andrews
503e5aa8d2400e47c9617db10b57f2d4f3495fd2Mark Andrews/** define if getaddrinfo() exists */
503e5aa8d2400e47c9617db10b57f2d4f3495fd2Mark Andrews#define HAVE_GETADDRINFO
503e5aa8d2400e47c9617db10b57f2d4f3495fd2Mark Andrews
503e5aa8d2400e47c9617db10b57f2d4f3495fd2Mark Andrews/** define if gai_strerror() exists */
503e5aa8d2400e47c9617db10b57f2d4f3495fd2Mark Andrews#define HAVE_GAISTRERROR
503e5aa8d2400e47c9617db10b57f2d4f3495fd2Mark Andrews
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt/* return type of gai_strerror */
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt#define IRS_GAISTRERROR_RETURN_T char *
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt/* Define to the buffer length type used by getnameinfo(3). */
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt#define IRS_GETNAMEINFO_BUFLEN_T DWORD
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt/* Define to the flags type used by getnameinfo(3). */
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt#define IRS_GETNAMEINFO_FLAGS_T int
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt
ff62d4458acda2110a3763ec576a4f728450662cEvan Hunt/* Define to the sockaddr length type used by getnameinfo(3). */
ff62d4458acda2110a3763ec576a4f728450662cEvan Hunt#define IRS_GETNAMEINFO_SOCKLEN_T socklen_t
ff62d4458acda2110a3763ec576a4f728450662cEvan Hunt
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Define to enable the "filter-aaaa-on-v4" and "filter-aaaa-on-v6" options.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@ALLOW_FILTER_AAAA@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Define to enable "rrset-order fixed" syntax. */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@DNS_RDATASET_FIXED@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Define to 1 if you have the `EVP_sha256' function. */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_EVP_SHA256@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Define to 1 if you have the `EVP_sha384' function. */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_EVP_SHA384@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Define to 1 if you have the `EVP_sha512' function. */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_EVP_SHA512@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis Dupont/* Define if OpenSSL provides FIPS_mode() */
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis Dupont@HAVE_FIPS_MODE@
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis Dupont
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Define if OpenSSL includes DSA support */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_OPENSSL_DSA@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Define if OpenSSL includes ECDSA support */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_OPENSSL_ECDSA@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont/* Define if OpenSSL includes Ed25519 support */
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont@HAVE_OPENSSL_ED25519@
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont/* Define if OpenSSL includes Ed448 support */
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont@HAVE_OPENSSL_ED448@
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont
891b61c3909afdae7e5d7ba14cd12d16186f4a68Mark Andrews/* Define if your OpenSSL version supports GOST. */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_OPENSSL_GOST@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt/* Define if your PKCS11 provider supports ECDSA. */
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt@HAVE_PKCS11_ECDSA@
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont/* Define if your PKCS11 provider supports Ed25519. */
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont@HAVE_PKCS11_ED25519@
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont/* Define if your PKCS11 provider supports Ed448. */
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont@HAVE_PKCS11_ED448@
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt/* Define if your PKCS11 provider supports GOST. */
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt@HAVE_PKCS11_GOST@
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
12bf5d4796505b4c20680531da96a31e6c2c1144Evan Hunt/* Define if GOST private keys are encoded in ASN.1. */
12bf5d4796505b4c20680531da96a31e6c2c1144Evan Hunt@PREFER_GOSTASN1@
12bf5d4796505b4c20680531da96a31e6c2c1144Evan Hunt
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt/* Define if your OpenSSL version supports EVP AES */
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt@HAVE_OPENSSL_EVP_AES@
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt/* Define if your OpenSSL version supports AES */
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt@HAVE_OPENSSL_AES@
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt
fc63119c8b7aa8827fad9e3e45e50c69bc2630e8Francis Dupont/* HMAC_*() return ints */
fc63119c8b7aa8827fad9e3e45e50c69bc2630e8Francis Dupont@HMAC_RETURN_INT@
fc63119c8b7aa8827fad9e3e45e50c69bc2630e8Francis Dupont
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont/* Use AES for Client Cookie generation */
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont@AES_CC@
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont/* Use HMAC-SHA1 for Client Cookie generation */
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont@HMAC_SHA1_CC@
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont/* Use HMAC-SHA256 for Client Cookie generation */
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont@HMAC_SHA256_CC@
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Define to 1 if you have the `readline' function. */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_READLINE@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Build with GeoIP support */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_GEOIP@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* define if idnkit support is to be included. */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@WITH_IDN@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Build with GeoIP City IPv6 support */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_GEOIP_CITY_V6@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Build with GeoIP Country IPv6 support */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@HAVE_GEOIP_V6@
891b61c3909afdae7e5d7ba14cd12d16186f4a68Mark Andrews
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont/* Define if zlib was found */
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont@HAVE_ZLIB@
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont
891b61c3909afdae7e5d7ba14cd12d16186f4a68Mark Andrews/* Define to enable rpz-nsdname rules. */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@ENABLE_RPZ_NSDNAME@
891b61c3909afdae7e5d7ba14cd12d16186f4a68Mark Andrews
891b61c3909afdae7e5d7ba14cd12d16186f4a68Mark Andrews/* Define to enable rpz-nsip rules. */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@ENABLE_RPZ_NSIP@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* From enable developer */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews@ISC_LIST_CHECKINIT@
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
98091cb21da79b0c7fd329fd64497dcb03402467Evan Hunt/* Large system tuning */
98091cb21da79b0c7fd329fd64497dcb03402467Evan Hunt@TUNE_LARGE@
98091cb21da79b0c7fd329fd64497dcb03402467Evan Hunt
84f95ddb2572641022619950a211aff49e331c98Mukund Sivaraman/* Verbose query trace logging */
84f95ddb2572641022619950a211aff49e331c98Mukund Sivaraman@WANT_QUERYTRACE@
84f95ddb2572641022619950a211aff49e331c98Mukund Sivaraman
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt/*
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt * Define to nothing if C supports flexible array members, and to 1 if it does
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt * not. That way, with a declaration like `struct s { int n; double
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt * d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt * compilers. When computing the size of such an object, don't use 'sizeof
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt * (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt * instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt * MSVC and with C++ compilers.
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt */
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt#define FLEXIBLE_ARRAY_MEMBER /**/
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews/* Avoid warnings with strlen() */
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#ifdef _WIN64
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#define strlen(x) (unsigned int) strlen(x)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#endif
2dd959aa18d0f661efb0d9646963993a4773d036Evan Hunt
2dd959aa18d0f661efb0d9646963993a4773d036Evan Hunt/* Get SRCID */
2dd959aa18d0f661efb0d9646963993a4773d036Evan Hunt#include "srcid.h"