2 * Copyright (C) 2004, 2006-2009 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.24 2009/11/24 02:09:28 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' 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
49 #define _USE_32BIT_TIME_T 1
52 * Windows NT and 2K only
55 #define _WIN32_WINNT 0x0400
58 /* Define if you have the ANSI C header files. */
59 #define STDC_HEADERS 1
61 /* Define if you can safely include both <sys/time.h> and <time.h>. */
62 #define TIME_WITH_SYS_TIME 1
64 /* define on DEC OSF to enable 4.4BSD style sa_len support */
65 /* #undef _SOCKADDR_LEN */
67 /* define if your system needs pthread_init() before using pthreads */
68 /* #undef NEED_PTHREAD_INIT */
70 /* define if your system has sigwait() */
71 /* #undef HAVE_SIGWAIT */
73 /* define on Solaris to get sigwait() to work using pthreads semantics */
74 /* #undef _POSIX_PTHREAD_SEMANTICS */
76 /* define if LinuxThreads is in use */
77 /* #undef HAVE_LINUXTHREADS */
79 /* define if catgets() is available */
80 /* #undef HAVE_CATGETS */
82 /* define if you have the NET_RT_IFLIST sysctl variable. */
83 #define HAVE_IFLIST_SYSCTL 1
85 /* define if you need to #define _XPG4_2 before including sys/socket.h */
86 /* #undef NEED_XPG4_2_BEFORE_SOCKET_H */
88 /* define if you need to #define _XOPEN_SOURCE_ENTENDED before including
91 /* #undef NEED_XSE_BEFORE_SOCKET_H */
93 /* Define if you have the <fcntl.h> header file. */
94 #define HAVE_FCNTL_H 1
96 /* Define if you have the <sys/sockio.h> header file. */
97 #define HAVE_SYS_SOCKIO_H 1
99 /* Define if you have the <sys/time.h> header file. */
100 #define HAVE_SYS_TIME_H 1
102 /* Define if you have the <unistd.h> header file. */
103 #define HAVE_UNISTD_H 1
105 /* Define if you have the c_r library (-lc_r). */
106 /* #undef HAVE_LIBC_R */
108 /* Define if you have the nsl library (-lnsl). */
109 /* #undef HAVE_LIBNSL */
111 /* Define if you have the pthread library (-lpthread). */
112 /* #undef HAVE_LIBPTHREAD */
114 /* Define if you have the socket library (-lsocket). */
115 /* #undef HAVE_LIBSOCKET */
117 /* Define if you have h_errno */
120 /* Define if you have RSA_generate_key(). */
121 #define HAVE_RSA_GENERATE_KEY
123 /* Define if you have DSA_generate_parameters(). */
124 #define HAVE_DSA_GENERATE_PARAMETERS
126 /* Define if you have DH_generate_parameters(). */
127 #define HAVE_DH_GENERATE_PARAMETERS
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 */
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
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
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 */
162 * WIN32 specials until some other way of dealing with these is decided.
165 #define snprintf _snprintf
166 #define vsnprintf _vsnprintf
167 #define strcasecmp _stricmp
168 #define strncasecmp _strnicmp
169 #define strdup _strdup
171 #define isascii __isascii
174 #define fileno _fileno
175 #define unlink _unlink
178 #define getcwd _getcwd
180 #define utimbuf _utimbuf
182 /* #define EAFNOSUPPORT EINVAL */
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 */
196 * Set up the Version Information
198 #include <versions.h>
200 /* We actually are using the CryptAPI and not a device */
201 #define PATH_RANDOMDEV "CryptAPI"
208 * Applications may need to get the configuration path
211 #include <isc/ntpaths.h>
214 #define fdopen _fdopen
220 #define isatty _isatty
223 #define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */
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.
233 #define FD_SETSIZE 16384
237 * Windows doesn't use configure so just set "default" here.
239 #define CONFIGARGS "default"
242 * Define if libxml2 is present
244 #define HAVE_LIBXML2 1
247 * Define when building BIND9. When building exportable versions
248 * of libisc, libdns, etc, this must be removed.
253 * Define if PKCS11 is to be used.
255 /* #undef USE_PKCS11 */
257 /** define if struct addrinfo exists */
258 #define HAVE_ADDRINFO
260 /** define if getaddrinfo() exists */
261 #define HAVE_GETADDRINFO
263 /** define if gai_strerror() exists */
264 #define HAVE_GAISTRERROR