xref: /minix/external/bsd/bind/dist/config.h.win32 (revision bb9622b5)
1/*
2 * Copyright (C) 2004, 2006-2009, 2011-2014  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 int/__int64' 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#ifndef _WIN64
50#define _USE_32BIT_TIME_T 1
51#endif
52
53/*
54 * Minimum version is Windows XP
55 */
56#ifndef _WIN32_WINNT
57#define _WIN32_WINNT 0x0501
58#endif
59#if _WIN32_WINNT < 0x0501
60#error Minimum Target environment is Windows XP and Windows Server 2003
61#endif
62#ifndef NTDDI_VERSION
63#define NTDDI_VERSION 0x05010100
64#endif
65#if NTDDI_VERSION < 0x05010100
66#error Minimum Target environment is Windows XP SP1 and Windows Server 2003
67#endif
68
69/* Define if you have the ANSI C header files.  */
70#define STDC_HEADERS 1
71
72/* Define if you can safely include both <sys/time.h> and <time.h>.  */
73#define TIME_WITH_SYS_TIME 1
74
75/* define on DEC OSF to enable 4.4BSD style sa_len support */
76/* #undef _SOCKADDR_LEN */
77
78/* define if your system needs pthread_init() before using pthreads */
79/* #undef NEED_PTHREAD_INIT */
80
81/* define if your system has sigwait() */
82/* #undef HAVE_SIGWAIT */
83
84/* define on Solaris to get sigwait() to work using pthreads semantics */
85/* #undef _POSIX_PTHREAD_SEMANTICS */
86
87/* define if LinuxThreads is in use */
88/* #undef HAVE_LINUXTHREADS */
89
90/* define if catgets() is available */
91/* #undef HAVE_CATGETS */
92
93/* define if you have the NET_RT_IFLIST sysctl variable. */
94#define HAVE_IFLIST_SYSCTL 1
95
96/* define if you need to #define _XPG4_2 before including sys/socket.h */
97/* #undef NEED_XPG4_2_BEFORE_SOCKET_H */
98
99/* define if you need to #define _XOPEN_SOURCE_ENTENDED before including
100 * sys/socket.h
101 */
102/* #undef NEED_XSE_BEFORE_SOCKET_H */
103
104/* Define if you have the <fcntl.h> header file.  */
105#define HAVE_FCNTL_H 1
106
107/* Define if you have the <sys/sockio.h> header file.  */
108#define HAVE_SYS_SOCKIO_H 1
109
110/* Define if you have the <sys/time.h> header file.  */
111#define HAVE_SYS_TIME_H 1
112
113/* Define if you have the <unistd.h> header file.  */
114#define HAVE_UNISTD_H 1
115
116/* Define if you have the c_r library (-lc_r).  */
117/* #undef HAVE_LIBC_R */
118
119/* Define if you have the nsl library (-lnsl).  */
120/* #undef HAVE_LIBNSL */
121
122/* Define if you have the pthread library (-lpthread).  */
123/* #undef HAVE_LIBPTHREAD */
124
125/* Define if you have the socket library (-lsocket).  */
126/* #undef HAVE_LIBSOCKET */
127
128/* Define if you have h_errno */
129#define HAVE_H_ERRNO
130
131/* Define if you have RSA_generate_key(). */
132#define HAVE_RSA_GENERATE_KEY
133
134/* Define if you have DSA_generate_parameters(). */
135#define HAVE_DSA_GENERATE_PARAMETERS
136
137/* Define if you have DH_generate_parameters(). */
138#define HAVE_DH_GENERATE_PARAMETERS
139
140/* Define if you have getpassphrase in the C library. */
141#define HAVE_GETPASSPHRASE
142
143char *getpassphrase(const char *);
144
145/*
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()).
149 */
150#define ISC_DLZ_DLOPEN 1
151
152#define WANT_IPV6
153
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 */
162
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
170
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
174 */
175
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 */
182
183
184/*
185 * WIN32 specials until some other way of dealing with these is decided.
186 */
187
188#if _MSC_VER < 1900
189#define snprintf _snprintf
190#endif
191#if _MSC_VER <= 1400
192#define vsnprintf _vsnprintf
193#endif
194#define strcasecmp  _stricmp
195#define strncasecmp _strnicmp
196#define strdup _strdup
197#define sopen _sopen
198#define isascii __isascii
199#ifndef _WIN64
200#define stat _stat
201#define fstat _fstat
202#else
203#define stat _stat64
204#define fstat _fstat64
205#endif
206#define fileno _fileno
207#define unlink _unlink
208#define chdir _chdir
209#define mkdir _mkdir
210#define rmdir _rmdir
211#define getcwd _getcwd
212#define utime _utime
213#define utimbuf _utimbuf
214#ifndef _WIN64
215#define lseek _lseek
216#else
217#define lseek _lseeki64
218#endif
219
220/* #define EAFNOSUPPORT EINVAL */
221#define chmod _chmod
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 */
227typedef unsigned int    uid_t;          /* user id */
228typedef unsigned int    gid_t;          /* group id */
229typedef long pid_t;			/* PID */
230#ifndef _WIN64
231typedef int ssize_t;
232typedef long off_t;
233#else
234typedef __int64 ssize_t;
235#ifndef _AFX
236/* BINDInstall defines it with another type but doesn't use it */
237typedef __int64 off_t;
238#endif
239#endif
240
241/*
242 * Set up the Version Information
243 */
244#include <versions.h>
245
246/* We actually are using the CryptAPI and not a device */
247#define PATH_RANDOMDEV		"CryptAPI"
248
249#include <stddef.h>
250#include <stdio.h>
251#include <stdarg.h>
252
253/*
254 * Applications may need to get the configuration path
255 */
256#ifndef _USRDLL
257#include <isc/ntpaths.h>
258#endif
259
260#define fdopen	_fdopen
261#define read	_read
262#define open	_open
263#define close	_close
264#define write	_write
265#include <io.h>
266#define isatty	_isatty
267
268#ifndef _WINSOCKAPI_
269#define _WINSOCKAPI_   /* Prevent inclusion of winsock.h in windows.h */
270#endif
271
272/*
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.
277 */
278
279#ifndef FD_SETSIZE
280#define FD_SETSIZE 16384
281#endif
282#include <windows.h>
283
284/*
285 * main() is hooked
286 */
287#define ISC_MAIN_HOOK 1
288
289/*
290 * Configure sensible arguments
291 */
292@CONFIGARGS@
293
294/*
295 * Define if libxml2 is present
296 */
297@HAVE_LIBXML2@
298
299/** define if struct addrinfo exists */
300#define HAVE_ADDRINFO
301
302/** define if getaddrinfo() exists */
303#define HAVE_GETADDRINFO
304
305/** define if gai_strerror() exists */
306#define HAVE_GAISTRERROR
307
308/* return type of gai_strerror */
309#define IRS_GAISTRERROR_RETURN_T char *
310
311/* Define to the buffer length type used by getnameinfo(3). */
312#define IRS_GETNAMEINFO_BUFLEN_T DWORD
313
314/* Define to the flags type used by getnameinfo(3). */
315#define IRS_GETNAMEINFO_FLAGS_T int
316
317/* Define to the sockaddr length type used by getnameinfo(3). */
318#define IRS_GETNAMEINFO_SOCKLEN_T socklen_t
319
320/* Define to enable the "filter-aaaa-on-v4" and "filter-aaaa-on-v6" options.
321   */
322@ALLOW_FILTER_AAAA@
323
324/* Define to enable "rrset-order fixed" syntax. */
325@DNS_RDATASET_FIXED@
326
327/* Define to 1 if you have the `EVP_sha256' function. */
328@HAVE_EVP_SHA256@
329
330/* Define to 1 if you have the `EVP_sha384' function. */
331@HAVE_EVP_SHA384@
332
333/* Define to 1 if you have the `EVP_sha512' function. */
334@HAVE_EVP_SHA512@
335
336/* Define if OpenSSL includes DSA support */
337@HAVE_OPENSSL_DSA@
338
339/* Define if OpenSSL includes ECDSA support */
340@HAVE_OPENSSL_ECDSA@
341
342/* Define if your OpenSSL version supports GOST. */
343@HAVE_OPENSSL_GOST@
344
345/* Define if your PKCS11 provider supports ECDSA. */
346@HAVE_PKCS11_ECDSA@
347
348/* Define if your PKCS11 provider supports GOST. */
349@HAVE_PKCS11_GOST@
350
351/* Define if GOST private keys are encoded in ASN.1. */
352@PREFER_GOSTASN1@
353
354/* Define if your OpenSSL version supports EVP AES */
355@HAVE_OPENSSL_EVP_AES@
356
357/* Define if your OpenSSL version supports AES */
358@HAVE_OPENSSL_AES@
359
360/* HMAC_*() return ints */
361@HMAC_RETURN_INT@
362
363/* Use AES for Source Identity Token generation */
364@AES_SIT@
365
366/* Use HMAC-SHA1 for Source Identity Token generation */
367@HMAC_SHA1_SIT@
368
369/* Use HMAC-SHA256 for Source Identity Token generation */
370@HMAC_SHA256_SIT@
371
372/* Define to 1 if you have the `readline' function. */
373@HAVE_READLINE@
374
375/* Build with GeoIP support */
376@HAVE_GEOIP@
377
378/* define if idnkit support is to be included. */
379@WITH_IDN@
380
381/* Build with GeoIP City IPv6 support */
382@HAVE_GEOIP_CITY_V6@
383
384/* Build with GeoIP Country IPv6 support */
385@HAVE_GEOIP_V6@
386
387/* Define to enable rpz-nsdname rules. */
388@ENABLE_RPZ_NSDNAME@
389
390/* Define to enable rpz-nsip rules. */
391@ENABLE_RPZ_NSIP@
392
393/* From enable developer */
394@ISC_LIST_CHECKINIT@
395
396/* Large system tuning */
397@TUNE_LARGE@
398
399/*
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.
407 */
408#define FLEXIBLE_ARRAY_MEMBER /**/
409
410/* Avoid warnings with strlen() */
411#ifdef _WIN64
412#define strlen(x)	(unsigned int) strlen(x)
413#endif
414
415/* Get SRCID */
416#include "srcid.h"
417