File: config.h.win32

package info (click to toggle)
bind9 1:9.9.5.dfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 42,976 kB
  • sloc: ansic: 313,014; sh: 53,890; cpp: 19,217; xml: 18,756; perl: 6,769; makefile: 5,043; tcl: 842; awk: 236; python: 129
file content (365 lines) | stat: -rw-r--r-- 9,293 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
/*
 * Copyright (C) 2004, 2006-2009, 2011-2013  Internet Systems Consortium, Inc. ("ISC")
 * Copyright (C) 1999-2001  Internet Software Consortium.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 * PERFORMANCE OF THIS SOFTWARE.
 */

/* $Id: config.h.win32,v 1.28 2011/10/30 23:39:39 marka Exp $ */

/*
 * win32 configuration file
 * All definitions, declarations, macros and includes are
 * specific to the requirements of the Windows NT and Windows 2000
 * platforms
 */

/* Define to empty if the keyword does not work.  */
/* #undef const */

/* Define as __inline if that's what the C compiler calls it.  */
#define inline __inline

/* Define to `unsigned int/__int64' if <sys/types.h> doesn't define.  */
/* #undef size_t */

/*
 * ANSI C compliance enabled
 */
#define __STDC__ 1

/*
 * Silence compiler warnings about using strcpy and friends.
 */
#define _CRT_SECURE_NO_DEPRECATE 1

/*
 * Use 32 bit time.
 */
#ifndef _WIN64
#define _USE_32BIT_TIME_T 1
#endif

/*
 * Minimum version is Windows XP
 */
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#if _WIN32_WINNT < 0x0501
#error Minimum Target environment is Windows XP and Windows Server 2003
#endif
#ifndef NTDDI_VERSION
#define NTDDI_VERSION 0x05010100
#endif
#if NTDDI_VERSION < 0x05010100
#error Minimum Target environment is Windows XP SP1 and Windows Server 2003
#endif

/* Define if you have the ANSI C header files.  */
#define STDC_HEADERS 1

/* Define if you can safely include both <sys/time.h> and <time.h>.  */
#define TIME_WITH_SYS_TIME 1

/* define on DEC OSF to enable 4.4BSD style sa_len support */
/* #undef _SOCKADDR_LEN */

/* define if your system needs pthread_init() before using pthreads */
/* #undef NEED_PTHREAD_INIT */

/* define if your system has sigwait() */
/* #undef HAVE_SIGWAIT */

/* define on Solaris to get sigwait() to work using pthreads semantics */
/* #undef _POSIX_PTHREAD_SEMANTICS */

/* define if LinuxThreads is in use */
/* #undef HAVE_LINUXTHREADS */

/* define if catgets() is available */
/* #undef HAVE_CATGETS */

/* define if you have the NET_RT_IFLIST sysctl variable. */
#define HAVE_IFLIST_SYSCTL 1

/* define if you need to #define _XPG4_2 before including sys/socket.h */
/* #undef NEED_XPG4_2_BEFORE_SOCKET_H */

/* define if you need to #define _XOPEN_SOURCE_ENTENDED before including
 * sys/socket.h
 */
/* #undef NEED_XSE_BEFORE_SOCKET_H */

/* Define if you have the <fcntl.h> header file.  */
#define HAVE_FCNTL_H 1

/* Define if you have the <sys/sockio.h> header file.  */
#define HAVE_SYS_SOCKIO_H 1

/* Define if you have the <sys/time.h> header file.  */
#define HAVE_SYS_TIME_H 1

/* Define if you have the <unistd.h> header file.  */
#define HAVE_UNISTD_H 1

/* Define if you have the c_r library (-lc_r).  */
/* #undef HAVE_LIBC_R */

/* Define if you have the nsl library (-lnsl).  */
/* #undef HAVE_LIBNSL */

/* Define if you have the pthread library (-lpthread).  */
/* #undef HAVE_LIBPTHREAD */

/* Define if you have the socket library (-lsocket).  */
/* #undef HAVE_LIBSOCKET */

/* Define if you have h_errno */
#define HAVE_H_ERRNO

/* Define if you have RSA_generate_key(). */
#define HAVE_RSA_GENERATE_KEY

/* Define if you have DSA_generate_parameters(). */
#define HAVE_DSA_GENERATE_PARAMETERS

/* Define if you have DH_generate_parameters(). */
#define HAVE_DH_GENERATE_PARAMETERS

/*
 * Define to 1 if you want to use the DLZ "dlopen" driver
 * (which has the same name on windows even though it uses
 * LoadLibrary() instead of dlopen()).
 */
#define ISC_DLZ_DLOPEN 1

#define WANT_IPV6

#define S_IFMT   _S_IFMT         /* file type mask */
#define S_IFDIR  _S_IFDIR        /* directory */
#define S_IFCHR  _S_IFCHR        /* character special */
#define S_IFIFO  _S_IFIFO        /* pipe */
#define S_IFREG  _S_IFREG        /* regular */
#define S_IREAD  _S_IREAD        /* read permission, owner */
#define S_IWRITE _S_IWRITE       /* write permission, owner */
#define S_IEXEC  _S_IEXEC        /* execute/search permission, owner */

#define O_RDONLY        _O_RDONLY
#define O_WRONLY        _O_WRONLY
#define O_RDWR          _O_RDWR
#define O_APPEND        _O_APPEND
#define O_CREAT         _O_CREAT
#define O_TRUNC         _O_TRUNC
#define O_EXCL          _O_EXCL

/* open() under unix allows setting of read/write permissions
 * at the owner, group and other levels.  These don't exist in NT
 * We'll just map them all to the NT equivalent
 */

#define S_IRUSR _S_IREAD	/* Owner read permission */
#define S_IWUSR _S_IWRITE	/* Owner write permission */
#define S_IRGRP _S_IREAD	/* Group read permission */
#define S_IWGRP _S_IWRITE	/* Group write permission */
#define S_IROTH _S_IREAD	/* Other read permission */
#define S_IWOTH _S_IWRITE	/* Other write permission */


/*
 * WIN32 specials until some other way of dealing with these is decided.
 */

#define snprintf _snprintf
#if _MSC_VER <= 1400
#define vsnprintf _vsnprintf
#endif
#define strcasecmp  _stricmp
#define strncasecmp _strnicmp
#define strdup _strdup
#define sopen _sopen
#define isascii __isascii
#ifndef _WIN64
#define stat _stat
#define fstat _fstat
#else
#define stat _stat64
#define fstat _fstat64
#endif
#define fileno _fileno
#define unlink _unlink
#define chdir _chdir
#define mkdir _mkdir
#define rmdir _rmdir
#define getcwd _getcwd
#define utime _utime
#define utimbuf _utimbuf
#ifndef _WIN64
#define lseek _lseek
#else
#define lseek _lseeki64
#endif

/* #define EAFNOSUPPORT EINVAL */
#define chmod _chmod
#define getpid _getpid
#define getppid _getpid	/* WARNING!!! For now this gets the same pid */
#define random rand	/* Random number generator */
#define srandom srand	/* Random number generator seeding */
/* for the config file */
typedef unsigned int    uid_t;          /* user id */
typedef unsigned int    gid_t;          /* group id */
typedef long pid_t;			/* PID */
#ifndef _WIN64
typedef int ssize_t;
typedef long off_t;
#else
typedef __int64 ssize_t;
#ifndef _AFX
/* BINDInstall defines it with another type but doesn't use it */
typedef __int64 off_t;
#endif
#endif

/*
 * Set up the Version Information
 */
#include <versions.h>

/* We actually are using the CryptAPI and not a device */
#define PATH_RANDOMDEV		"CryptAPI"

#include <stddef.h>
#include <stdio.h>
#include <stdarg.h>

/*
 * Applications may need to get the configuration path
 */
#ifndef _USRDLL
#include <isc/ntpaths.h>
#endif

#define fdopen	_fdopen
#define read	_read
#define open	_open
#define close	_close
#define write	_write
#include <io.h>
#define isatty	_isatty

#ifndef _WINSOCKAPI_
#define _WINSOCKAPI_   /* Prevent inclusion of winsock.h in windows.h */
#endif

/*
 * Make the number of available sockets large
 * The number of sockets needed can get large and memory's cheap
 * This must be defined before winsock2.h gets included as the
 * macro is used there.
 */

#ifndef FD_SETSIZE
#define FD_SETSIZE 16384
#endif
#include <windows.h>

/*
 * main() is hooked
 */
#define ISC_MAIN_HOOK 1

/*
 * Configure sensible arguments
 */
@CONFIGARGS@

/*
 * Define if libxml2 is present
 */
@HAVE_LIBXML2@

/*
 * Define when building BIND9.  When building exportable versions
 * of libisc, libdns, etc, this must be removed.
 */
#define BIND9 1

/** define if struct addrinfo exists */
#define HAVE_ADDRINFO

/** define if getaddrinfo() exists */
#define HAVE_GETADDRINFO

/** define if gai_strerror() exists */
#define HAVE_GAISTRERROR

/* Define to enable the "filter-aaaa-on-v4" and "filter-aaaa-on-v6" options.
   */
@ALLOW_FILTER_AAAA@

/* Define to enable "rrset-order fixed" syntax. */
@DNS_RDATASET_FIXED@

/* Define to 1 if you have the `EVP_sha256' function. */
@HAVE_EVP_SHA256@

/* Define to 1 if you have the `EVP_sha384' function. */
@HAVE_EVP_SHA384@

/* Define to 1 if you have the `EVP_sha512' function. */
@HAVE_EVP_SHA512@

/* Define if OpenSSL includes DSA support */
@HAVE_OPENSSL_DSA@

/* Define if OpenSSL includes ECDSA support */
@HAVE_OPENSSL_ECDSA@

/* Define if your OpenSSL version supports GOST. */
@HAVE_OPENSSL_GOST@

/* Define to 1 if you have the `readline' function. */
@HAVE_READLINE@

/* Build with GeoIP support */
@HAVE_GEOIP@

/* define if idnkit support is to be included. */
@WITH_IDN@

/* Build with GeoIP City IPv6 support */
@HAVE_GEOIP_CITY_V6@

/* Build with GeoIP Country IPv6 support */
@HAVE_GEOIP_V6@

/* Define to enable rpz-nsdname rules. */
@ENABLE_RPZ_NSDNAME@

/* Define to enable rpz-nsip rules. */
@ENABLE_RPZ_NSIP@

/* From enable developer */
@ISC_LIST_CHECKINIT@

/* Avoid warnings with strlen() */
#ifdef _WIN64
#define strlen(x)	(unsigned int) strlen(x)
#endif

/* Define to enable response rate limiting. */
#define USE_RRL

/* Get SRCID */
#include "srcid.h"