update to 9.7.1-P2
[tridge/bind9.git] / config.h.win32
1 /*
2  * Copyright (C) 2004, 2006-2009  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.24 2009/11/24 02:09:28 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  * Windows NT and 2K only
53  */
54 #ifndef _WIN32_WINNT
55 #define _WIN32_WINNT 0x0400
56 #endif
57
58 /* Define if you have the ANSI C header files.  */
59 #define STDC_HEADERS 1
60
61 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
62 #define TIME_WITH_SYS_TIME 1
63
64 /* define on DEC OSF to enable 4.4BSD style sa_len support */
65 /* #undef _SOCKADDR_LEN */
66
67 /* define if your system needs pthread_init() before using pthreads */
68 /* #undef NEED_PTHREAD_INIT */
69
70 /* define if your system has sigwait() */
71 /* #undef HAVE_SIGWAIT */
72
73 /* define on Solaris to get sigwait() to work using pthreads semantics */
74 /* #undef _POSIX_PTHREAD_SEMANTICS */
75
76 /* define if LinuxThreads is in use */
77 /* #undef HAVE_LINUXTHREADS */
78
79 /* define if catgets() is available */
80 /* #undef HAVE_CATGETS */
81
82 /* define if you have the NET_RT_IFLIST sysctl variable. */
83 #define HAVE_IFLIST_SYSCTL 1
84
85 /* define if you need to #define _XPG4_2 before including sys/socket.h */
86 /* #undef NEED_XPG4_2_BEFORE_SOCKET_H */
87
88 /* define if you need to #define _XOPEN_SOURCE_ENTENDED before including
89  * sys/socket.h
90  */
91 /* #undef NEED_XSE_BEFORE_SOCKET_H */
92
93 /* Define if you have the <fcntl.h> header file.  */
94 #define HAVE_FCNTL_H 1
95
96 /* Define if you have the <sys/sockio.h> header file.  */
97 #define HAVE_SYS_SOCKIO_H 1
98
99 /* Define if you have the <sys/time.h> header file.  */
100 #define HAVE_SYS_TIME_H 1
101
102 /* Define if you have the <unistd.h> header file.  */
103 #define HAVE_UNISTD_H 1
104
105 /* Define if you have the c_r library (-lc_r).  */
106 /* #undef HAVE_LIBC_R */
107
108 /* Define if you have the nsl library (-lnsl).  */
109 /* #undef HAVE_LIBNSL */
110
111 /* Define if you have the pthread library (-lpthread).  */
112 /* #undef HAVE_LIBPTHREAD */
113
114 /* Define if you have the socket library (-lsocket).  */
115 /* #undef HAVE_LIBSOCKET */
116
117 /* Define if you have h_errno */
118 #define HAVE_H_ERRNO
119
120 /* Define if you have RSA_generate_key(). */
121 #define HAVE_RSA_GENERATE_KEY
122
123 /* Define if you have DSA_generate_parameters(). */
124 #define HAVE_DSA_GENERATE_PARAMETERS
125
126 /* Define if you have DH_generate_parameters(). */
127 #define HAVE_DH_GENERATE_PARAMETERS
128
129 #define WANT_IPV6
130
131 #define S_IFMT   _S_IFMT         /* file type mask */
132 #define S_IFDIR  _S_IFDIR        /* directory */
133 #define S_IFCHR  _S_IFCHR        /* character special */
134 #define S_IFIFO  _S_IFIFO        /* pipe */
135 #define S_IFREG  _S_IFREG        /* regular */
136 #define S_IREAD  _S_IREAD        /* read permission, owner */
137 #define S_IWRITE _S_IWRITE       /* write permission, owner */
138 #define S_IEXEC  _S_IEXEC        /* execute/search permission, owner */
139
140 #define O_RDONLY        _O_RDONLY
141 #define O_WRONLY        _O_WRONLY
142 #define O_RDWR          _O_RDWR
143 #define O_APPEND        _O_APPEND
144 #define O_CREAT         _O_CREAT
145 #define O_TRUNC         _O_TRUNC
146 #define O_EXCL          _O_EXCL
147
148 /* open() under unix allows setting of read/write permissions
149  * at the owner, group and other levels.  These don't exist in NT
150  * We'll just map them all to the NT equivalent
151  */
152
153 #define S_IRUSR _S_IREAD        /* Owner read permission */
154 #define S_IWUSR _S_IWRITE       /* Owner write permission */
155 #define S_IRGRP _S_IREAD        /* Group read permission */
156 #define S_IWGRP _S_IWRITE       /* Group write permission */
157 #define S_IROTH _S_IREAD        /* Other read permission */
158 #define S_IWOTH _S_IWRITE       /* Other write permission */
159
160
161 /*
162  * WIN32 specials until some other way of dealing with these is decided.
163  */
164
165 #define snprintf _snprintf
166 #define vsnprintf _vsnprintf
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 */
189 typedef unsigned int    uid_t;          /* user id */
190 typedef unsigned int    gid_t;          /* group id */
191 typedef long pid_t;                     /* PID */
192 typedef int ssize_t;
193 typedef 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