1/* 2 * Copyright (C) 2004, 2006-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC") 3 * Copyright (C) 1999-2001 Internet Software Consortium. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 * PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18/* $Id$ */ 19 20/* 21 * win32 configuration file 22 * All definitions, declarations, macros and includes are 23 * specific to the requirements of the Windows NT and Windows 2000 24 * platforms 25 */ 26 27/* Define to empty if the keyword does not work. */ 28/* #undef const */ 29 30/* Define as __inline if that's what the C compiler calls it. */ 31#define inline __inline 32 33/* Define to `unsigned' if <sys/types.h> doesn't define. */ 34/* #undef size_t */ 35 36/* 37 * ANSI C compliance enabled 38 */ 39#define __STDC__ 1 40 41/* 42 * Silence compiler warnings about using strcpy and friends. 43 */ 44#define _CRT_SECURE_NO_DEPRECATE 1 45 46/* 47 * Use 32 bit time. 48 */ 49#define _USE_32BIT_TIME_T 1 50 51/* 52 * Minimum version is Windows XP 53 */ 54#define _WIN32_WINNT 0x0501 55 56/* Define if you have the ANSI C header files. */ 57#define STDC_HEADERS 1 58 59/* Define if you can safely include both <sys/time.h> and <time.h>. */ 60#define TIME_WITH_SYS_TIME 1 61 62/* define on DEC OSF to enable 4.4BSD style sa_len support */ 63/* #undef _SOCKADDR_LEN */ 64 65/* define if your system needs pthread_init() before using pthreads */ 66/* #undef NEED_PTHREAD_INIT */ 67 68/* define if your system has sigwait() */ 69/* #undef HAVE_SIGWAIT */ 70 71/* define on Solaris to get sigwait() to work using pthreads semantics */ 72/* #undef _POSIX_PTHREAD_SEMANTICS */ 73 74/* define if LinuxThreads is in use */ 75/* #undef HAVE_LINUXTHREADS */ 76 77/* define if catgets() is available */ 78/* #undef HAVE_CATGETS */ 79 80/* define if you have the NET_RT_IFLIST sysctl variable. */ 81#define HAVE_IFLIST_SYSCTL 1 82 83/* define if you need to #define _XPG4_2 before including sys/socket.h */ 84/* #undef NEED_XPG4_2_BEFORE_SOCKET_H */ 85 86/* define if you need to #define _XOPEN_SOURCE_ENTENDED before including 87 * sys/socket.h 88 */ 89/* #undef NEED_XSE_BEFORE_SOCKET_H */ 90 91/* Define if you have the <fcntl.h> header file. */ 92#define HAVE_FCNTL_H 1 93 94/* Define if you have the <sys/sockio.h> header file. */ 95#define HAVE_SYS_SOCKIO_H 1 96 97/* Define if you have the <sys/time.h> header file. */ 98#define HAVE_SYS_TIME_H 1 99 100/* Define if you have the <unistd.h> header file. */ 101#define HAVE_UNISTD_H 1 102 103/* Define if you have the c_r library (-lc_r). */ 104/* #undef HAVE_LIBC_R */ 105 106/* Define if you have the nsl library (-lnsl). */ 107/* #undef HAVE_LIBNSL */ 108 109/* Define if you have the pthread library (-lpthread). */ 110/* #undef HAVE_LIBPTHREAD */ 111 112/* Define if you have the socket library (-lsocket). */ 113/* #undef HAVE_LIBSOCKET */ 114 115/* Define if you have h_errno */ 116#define HAVE_H_ERRNO 117 118/* Define if you have RSA_generate_key(). */ 119#define HAVE_RSA_GENERATE_KEY 120 121/* Define if you have DSA_generate_parameters(). */ 122#define HAVE_DSA_GENERATE_PARAMETERS 123 124/* Define if you have DH_generate_parameters(). */ 125#define HAVE_DH_GENERATE_PARAMETERS 126 127#define WANT_IPV6 128 129#define S_IFMT _S_IFMT /* file type mask */ 130#define S_IFDIR _S_IFDIR /* directory */ 131#define S_IFCHR _S_IFCHR /* character special */ 132#define S_IFIFO _S_IFIFO /* pipe */ 133#define S_IFREG _S_IFREG /* regular */ 134#define S_IREAD _S_IREAD /* read permission, owner */ 135#define S_IWRITE _S_IWRITE /* write permission, owner */ 136#define S_IEXEC _S_IEXEC /* execute/search permission, owner */ 137 138#define O_RDONLY _O_RDONLY 139#define O_WRONLY _O_WRONLY 140#define O_RDWR _O_RDWR 141#define O_APPEND _O_APPEND 142#define O_CREAT _O_CREAT 143#define O_TRUNC _O_TRUNC 144#define O_EXCL _O_EXCL 145 146/* open() under unix allows setting of read/write permissions 147 * at the owner, group and other levels. These don't exist in NT 148 * We'll just map them all to the NT equivalent 149 */ 150 151#define S_IRUSR _S_IREAD /* Owner read permission */ 152#define S_IWUSR _S_IWRITE /* Owner write permission */ 153#define S_IRGRP _S_IREAD /* Group read permission */ 154#define S_IWGRP _S_IWRITE /* Group write permission */ 155#define S_IROTH _S_IREAD /* Other read permission */ 156#define S_IWOTH _S_IWRITE /* Other write permission */ 157 158 159/* 160 * WIN32 specials until some other way of dealing with these is decided. 161 */ 162 163#define snprintf _snprintf 164#if _MSC_VER <= 1400 165#define vsnprintf _vsnprintf 166#endif 167#define strcasecmp _stricmp 168#define strncasecmp _strnicmp 169#define strdup _strdup 170#define sopen _sopen 171#define isascii __isascii 172#define stat _stat 173#define fstat _fstat 174#define fileno _fileno 175#define unlink _unlink 176#define chdir _chdir 177#define mkdir _mkdir 178#define getcwd _getcwd 179#define utime _utime 180#define utimbuf _utimbuf 181 182/* #define EAFNOSUPPORT EINVAL */ 183#define chmod _chmod 184#define getpid _getpid 185#define getppid _getpid /* WARNING!!! For now this gets the same pid */ 186#define random rand /* Random number generator */ 187#define srandom srand /* Random number generator seeding */ 188/* for the config file */ 189typedef unsigned int uid_t; /* user id */ 190typedef unsigned int gid_t; /* group id */ 191typedef long pid_t; /* PID */ 192typedef int ssize_t; 193typedef long off_t; 194 195/* 196 * Set up the Version Information 197 */ 198#include <versions.h> 199 200/* We actually are using the CryptAPI and not a device */ 201#define PATH_RANDOMDEV "CryptAPI" 202 203#include <stddef.h> 204#include <stdio.h> 205#include <stdarg.h> 206 207/* 208 * Applications may need to get the configuration path 209 */ 210#ifndef _USRDLL 211#include <isc/ntpaths.h> 212#endif 213 214#define fdopen _fdopen 215#define read _read 216#define open _open 217#define close _close 218#define write _write 219#include <io.h> 220#define isatty _isatty 221 222#ifndef _WINSOCKAPI_ 223#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */ 224#endif 225 226/* 227 * Make the number of available sockets large 228 * The number of sockets needed can get large and memory's cheap 229 * This must be defined before winsock2.h gets included as the 230 * macro is used there. 231 */ 232 233#define FD_SETSIZE 16384 234#include <windows.h> 235 236/* 237 * Windows doesn't use configure so just set "default" here. 238 */ 239#define CONFIGARGS "default" 240 241/* 242 * Define if libxml2 is present 243 */ 244#define HAVE_LIBXML2 1 245 246/* 247 * Define when building BIND9. When building exportable versions 248 * of libisc, libdns, etc, this must be removed. 249 */ 250#define BIND9 1 251 252/* 253 * Define if PKCS11 is to be used. 254 */ 255/* #undef USE_PKCS11 */ 256 257/** define if struct addrinfo exists */ 258#define HAVE_ADDRINFO 259 260/** define if getaddrinfo() exists */ 261#define HAVE_GETADDRINFO 262 263/** define if gai_strerror() exists */ 264#define HAVE_GAISTRERROR 265 266/* Define if your OpenSSL version supports GOST. */ 267#define HAVE_OPENSSL_GOST 268 269/* Define to enable rpz-nsdname rules. */ 270#define ENABLE_RPZ_NSDNAME 271 272/* Define to enable rpz-nsip rules. */ 273#define ENABLE_RPZ_NSIP 274