1/* 2 * Copyright (C) 2004, 2006-2009, 2011 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: config.h.win32,v 1.28 2011/10/30 23:39:39 marka Exp */ 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/* 128 * Define to 1 if you want to use the DLZ "dlopen" driver 129 * (which has the same name on windows even though it uses 130 * LoadLibrary() instead of dlopen()). 131 */ 132#define ISC_DLZ_DLOPEN 1 133 134#define WANT_IPV6 135 136#define S_IFMT _S_IFMT /* file type mask */ 137#define S_IFDIR _S_IFDIR /* directory */ 138#define S_IFCHR _S_IFCHR /* character special */ 139#define S_IFIFO _S_IFIFO /* pipe */ 140#define S_IFREG _S_IFREG /* regular */ 141#define S_IREAD _S_IREAD /* read permission, owner */ 142#define S_IWRITE _S_IWRITE /* write permission, owner */ 143#define S_IEXEC _S_IEXEC /* execute/search permission, owner */ 144 145#define O_RDONLY _O_RDONLY 146#define O_WRONLY _O_WRONLY 147#define O_RDWR _O_RDWR 148#define O_APPEND _O_APPEND 149#define O_CREAT _O_CREAT 150#define O_TRUNC _O_TRUNC 151#define O_EXCL _O_EXCL 152 153/* open() under unix allows setting of read/write permissions 154 * at the owner, group and other levels. These don't exist in NT 155 * We'll just map them all to the NT equivalent 156 */ 157 158#define S_IRUSR _S_IREAD /* Owner read permission */ 159#define S_IWUSR _S_IWRITE /* Owner write permission */ 160#define S_IRGRP _S_IREAD /* Group read permission */ 161#define S_IWGRP _S_IWRITE /* Group write permission */ 162#define S_IROTH _S_IREAD /* Other read permission */ 163#define S_IWOTH _S_IWRITE /* Other write permission */ 164 165 166/* 167 * WIN32 specials until some other way of dealing with these is decided. 168 */ 169 170#define snprintf _snprintf 171#if _MSC_VER <= 1400 172#define vsnprintf _vsnprintf 173#endif 174#define strcasecmp _stricmp 175#define strncasecmp _strnicmp 176#define strdup _strdup 177#define sopen _sopen 178#define isascii __isascii 179#define stat _stat 180#define fstat _fstat 181#define fileno _fileno 182#define unlink _unlink 183#define chdir _chdir 184#define mkdir _mkdir 185#define getcwd _getcwd 186#define utime _utime 187#define utimbuf _utimbuf 188 189/* #define EAFNOSUPPORT EINVAL */ 190#define chmod _chmod 191#define getpid _getpid 192#define getppid _getpid /* WARNING!!! For now this gets the same pid */ 193#define random rand /* Random number generator */ 194#define srandom srand /* Random number generator seeding */ 195/* for the config file */ 196typedef unsigned int uid_t; /* user id */ 197typedef unsigned int gid_t; /* group id */ 198typedef long pid_t; /* PID */ 199typedef int ssize_t; 200typedef long off_t; 201 202/* 203 * Set up the Version Information 204 */ 205#include <versions.h> 206 207/* We actually are using the CryptAPI and not a device */ 208#define PATH_RANDOMDEV "CryptAPI" 209 210#include <stddef.h> 211#include <stdio.h> 212#include <stdarg.h> 213 214/* 215 * Applications may need to get the configuration path 216 */ 217#ifndef _USRDLL 218#include <isc/ntpaths.h> 219#endif 220 221#define fdopen _fdopen 222#define read _read 223#define open _open 224#define close _close 225#define write _write 226#include <io.h> 227#define isatty _isatty 228 229#ifndef _WINSOCKAPI_ 230#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */ 231#endif 232 233/* 234 * Make the number of available sockets large 235 * The number of sockets needed can get large and memory's cheap 236 * This must be defined before winsock2.h gets included as the 237 * macro is used there. 238 */ 239 240#define FD_SETSIZE 16384 241#include <windows.h> 242 243/* 244 * Windows doesn't use configure so just set "default" here. 245 */ 246#define CONFIGARGS "default" 247 248/* 249 * Define if libxml2 is present 250 */ 251#define HAVE_LIBXML2 1 252 253/* 254 * Define when building BIND9. When building exportable versions 255 * of libisc, libdns, etc, this must be removed. 256 */ 257#define BIND9 1 258 259/* 260 * Define if PKCS11 is to be used. 261 */ 262/* #undef USE_PKCS11 */ 263 264/** define if struct addrinfo exists */ 265#define HAVE_ADDRINFO 266 267/** define if getaddrinfo() exists */ 268#define HAVE_GETADDRINFO 269 270/** define if gai_strerror() exists */ 271#define HAVE_GAISTRERROR 272 273/* Define if your OpenSSL version supports GOST. */ 274#define HAVE_OPENSSL_GOST 275 276/* Define to enable rpz-nsdname rules. */ 277#define ENABLE_RPZ_NSDNAME 278 279/* Define to enable rpz-nsip rules. */ 280#define ENABLE_RPZ_NSIP 281