2 * Copyright (C) 2004, 2006-2009, 2011-2014 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2001 Internet Software Consortium.
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.
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.
18 /* Id: config.h.win32,v 1.28 2011/10/30 23:39:39 marka Exp */
21 * win32 configuration file
22 * All definitions, declarations, macros and includes are
23 * specific to the requirements of the Windows NT and Windows 2000
27 /* Define to empty if the keyword does not work. */
30 /* Define as __inline if that's what the C compiler calls it. */
31 #define inline __inline
33 /* Define to `unsigned int/__int64' if <sys/types.h> doesn't define. */
37 * ANSI C compliance enabled
42 * Silence compiler warnings about using strcpy and friends.
44 #define _CRT_SECURE_NO_DEPRECATE 1
50 #define _USE_32BIT_TIME_T 1
54 * Minimum version is Windows XP
57 #define _WIN32_WINNT 0x0501
59 #if _WIN32_WINNT < 0x0501
60 #error Minimum Target environment is Windows XP and Windows Server 2003
63 #define NTDDI_VERSION 0x05010100
65 #if NTDDI_VERSION < 0x05010100
66 #error Minimum Target environment is Windows XP SP1 and Windows Server 2003
69 /* Define if you have the ANSI C header files. */
70 #define STDC_HEADERS 1
72 /* Define if you can safely include both <sys/time.h> and <time.h>. */
73 #define TIME_WITH_SYS_TIME 1
75 /* define on DEC OSF to enable 4.4BSD style sa_len support */
76 /* #undef _SOCKADDR_LEN */
78 /* define if your system needs pthread_init() before using pthreads */
79 /* #undef NEED_PTHREAD_INIT */
81 /* define if your system has sigwait() */
82 /* #undef HAVE_SIGWAIT */
84 /* define on Solaris to get sigwait() to work using pthreads semantics */
85 /* #undef _POSIX_PTHREAD_SEMANTICS */
87 /* define if LinuxThreads is in use */
88 /* #undef HAVE_LINUXTHREADS */
90 /* define if catgets() is available */
91 /* #undef HAVE_CATGETS */
93 /* define if you have the NET_RT_IFLIST sysctl variable. */
94 #define HAVE_IFLIST_SYSCTL 1
96 /* define if you need to #define _XPG4_2 before including sys/socket.h */
97 /* #undef NEED_XPG4_2_BEFORE_SOCKET_H */
99 /* define if you need to #define _XOPEN_SOURCE_ENTENDED before including
102 /* #undef NEED_XSE_BEFORE_SOCKET_H */
104 /* Define if you have the <fcntl.h> header file. */
105 #define HAVE_FCNTL_H 1
107 /* Define if you have the <sys/sockio.h> header file. */
108 #define HAVE_SYS_SOCKIO_H 1
110 /* Define if you have the <sys/time.h> header file. */
111 #define HAVE_SYS_TIME_H 1
113 /* Define if you have the <unistd.h> header file. */
114 #define HAVE_UNISTD_H 1
116 /* Define if you have the c_r library (-lc_r). */
117 /* #undef HAVE_LIBC_R */
119 /* Define if you have the nsl library (-lnsl). */
120 /* #undef HAVE_LIBNSL */
122 /* Define if you have the pthread library (-lpthread). */
123 /* #undef HAVE_LIBPTHREAD */
125 /* Define if you have the socket library (-lsocket). */
126 /* #undef HAVE_LIBSOCKET */
128 /* Define if you have h_errno */
131 /* Define if you have RSA_generate_key(). */
132 #define HAVE_RSA_GENERATE_KEY
134 /* Define if you have DSA_generate_parameters(). */
135 #define HAVE_DSA_GENERATE_PARAMETERS
137 /* Define if you have DH_generate_parameters(). */
138 #define HAVE_DH_GENERATE_PARAMETERS
140 /* Define if you have getpassphrase in the C library. */
141 #define HAVE_GETPASSPHRASE
143 char *getpassphrase(const char *);
146 * Define to 1 if you want to use the DLZ "dlopen" driver
147 * (which has the same name on windows even though it uses
148 * LoadLibrary() instead of dlopen()).
150 #define ISC_DLZ_DLOPEN 1
154 #define S_IFMT _S_IFMT /* file type mask */
155 #define S_IFDIR _S_IFDIR /* directory */
156 #define S_IFCHR _S_IFCHR /* character special */
157 #define S_IFIFO _S_IFIFO /* pipe */
158 #define S_IFREG _S_IFREG /* regular */
159 #define S_IREAD _S_IREAD /* read permission, owner */
160 #define S_IWRITE _S_IWRITE /* write permission, owner */
161 #define S_IEXEC _S_IEXEC /* execute/search permission, owner */
163 #define O_RDONLY _O_RDONLY
164 #define O_WRONLY _O_WRONLY
165 #define O_RDWR _O_RDWR
166 #define O_APPEND _O_APPEND
167 #define O_CREAT _O_CREAT
168 #define O_TRUNC _O_TRUNC
169 #define O_EXCL _O_EXCL
171 /* open() under unix allows setting of read/write permissions
172 * at the owner, group and other levels. These don't exist in NT
173 * We'll just map them all to the NT equivalent
176 #define S_IRUSR _S_IREAD /* Owner read permission */
177 #define S_IWUSR _S_IWRITE /* Owner write permission */
178 #define S_IRGRP _S_IREAD /* Group read permission */
179 #define S_IWGRP _S_IWRITE /* Group write permission */
180 #define S_IROTH _S_IREAD /* Other read permission */
181 #define S_IWOTH _S_IWRITE /* Other write permission */
185 * WIN32 specials until some other way of dealing with these is decided.
189 #define snprintf _snprintf
192 #define vsnprintf _vsnprintf
194 #define strcasecmp _stricmp
195 #define strncasecmp _strnicmp
196 #define strdup _strdup
198 #define isascii __isascii
204 #define fstat _fstat64
206 #define fileno _fileno
207 #define unlink _unlink
211 #define getcwd _getcwd
213 #define utimbuf _utimbuf
217 #define lseek _lseeki64
220 /* #define EAFNOSUPPORT EINVAL */
222 #define getpid _getpid
223 #define getppid _getpid /* WARNING!!! For now this gets the same pid */
224 #define random rand /* Random number generator */
225 #define srandom srand /* Random number generator seeding */
226 /* for the config file */
227 typedef unsigned int uid_t; /* user id */
228 typedef unsigned int gid_t; /* group id */
229 typedef long pid_t; /* PID */
234 typedef __int64 ssize_t;
236 /* BINDInstall defines it with another type but doesn't use it */
237 typedef __int64 off_t;
242 * Set up the Version Information
244 #include <versions.h>
246 /* We actually are using the CryptAPI and not a device */
247 #define PATH_RANDOMDEV "CryptAPI"
254 * Applications may need to get the configuration path
257 #include <isc/ntpaths.h>
260 #define fdopen _fdopen
266 #define isatty _isatty
269 #define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */
273 * Make the number of available sockets large
274 * The number of sockets needed can get large and memory's cheap
275 * This must be defined before winsock2.h gets included as the
276 * macro is used there.
280 #define FD_SETSIZE 16384
287 #define ISC_MAIN_HOOK 1
290 * Configure sensible arguments
295 * Define if libxml2 is present
299 /** define if struct addrinfo exists */
300 #define HAVE_ADDRINFO
302 /** define if getaddrinfo() exists */
303 #define HAVE_GETADDRINFO
305 /** define if gai_strerror() exists */
306 #define HAVE_GAISTRERROR
308 /* return type of gai_strerror */
309 #define IRS_GAISTRERROR_RETURN_T char *
311 /* Define to the buffer length type used by getnameinfo(3). */
312 #define IRS_GETNAMEINFO_BUFLEN_T DWORD
314 /* Define to the flags type used by getnameinfo(3). */
315 #define IRS_GETNAMEINFO_FLAGS_T int
317 /* Define to the sockaddr length type used by getnameinfo(3). */
318 #define IRS_GETNAMEINFO_SOCKLEN_T socklen_t
320 /* Define to enable the "filter-aaaa-on-v4" and "filter-aaaa-on-v6" options.
324 /* Define to enable "rrset-order fixed" syntax. */
327 /* Define to 1 if you have the `EVP_sha256' function. */
330 /* Define to 1 if you have the `EVP_sha384' function. */
333 /* Define to 1 if you have the `EVP_sha512' function. */
336 /* Define if OpenSSL includes DSA support */
339 /* Define if OpenSSL includes ECDSA support */
342 /* Define if your OpenSSL version supports GOST. */
345 /* Define if your PKCS11 provider supports ECDSA. */
348 /* Define if your PKCS11 provider supports GOST. */
351 /* Define if GOST private keys are encoded in ASN.1. */
354 /* Define if your OpenSSL version supports EVP AES */
355 @HAVE_OPENSSL_EVP_AES@
357 /* Define if your OpenSSL version supports AES */
360 /* HMAC_*() return ints */
363 /* Use AES for Source Identity Token generation */
366 /* Use HMAC-SHA1 for Source Identity Token generation */
369 /* Use HMAC-SHA256 for Source Identity Token generation */
372 /* Define to 1 if you have the `readline' function. */
375 /* Build with GeoIP support */
378 /* define if idnkit support is to be included. */
381 /* Build with GeoIP City IPv6 support */
384 /* Build with GeoIP Country IPv6 support */
387 /* Define to enable rpz-nsdname rules. */
390 /* Define to enable rpz-nsip rules. */
393 /* From enable developer */
396 /* Large system tuning */
400 * Define to nothing if C supports flexible array members, and to 1 if it does
401 * not. That way, with a declaration like `struct s { int n; double
402 * d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
403 * compilers. When computing the size of such an object, don't use 'sizeof
404 * (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
405 * instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
406 * MSVC and with C++ compilers.
408 #define FLEXIBLE_ARRAY_MEMBER /**/
410 /* Avoid warnings with strlen() */
412 #define strlen(x) (unsigned int) strlen(x)