~ubuntu-branches/ubuntu/precise/openvpn/precise-updates

« back to all changes in this revision

Viewing changes to config-win32.h.in

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-10-05 06:21:14 UTC
  • mfrom: (1.1.16 upstream) (10.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20101005062114-18lyqud9e3p4g735
Tags: 2.1.3-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  + debian/openvpn.init.d:
    - Do not use start-stop-daemon and </dev/null to avoid blocking boot.
    - Show per-VPN result messages.
    - Add "--script-security 2" by default for backwards compatablitiy
  + debian/control: Add lsb-base >= 3.2-14 to allow status_of_proc()

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  OpenVPN -- An application to securely tunnel IP networks
3
 
 *             over a single UDP port, with support for SSL/TLS-based
4
 
 *             session authentication and key exchange,
5
 
 *             packet encryption, packet authentication, and
6
 
 *             packet compression.
7
 
 *
8
 
 *  Copyright (C) 2002-2009 OpenVPN Technologies, Inc. <sales@openvpn.net>
9
 
 *
10
 
 *  This program is free software; you can redistribute it and/or modify
11
 
 *  it under the terms of the GNU General Public License version 2
12
 
 *  as published by the Free Software Foundation.
13
 
 *
14
 
 *  This program is distributed in the hope that it will be useful,
15
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 *  GNU General Public License for more details.
18
 
 *
19
 
 *  You should have received a copy of the GNU General Public License
20
 
 *  along with this program (see the file COPYING included with this
21
 
 *  distribution); if not, write to the Free Software Foundation, Inc.,
22
 
 *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
 
 */
24
 
 
25
 
/*
26
 
 * Configuration header for Win32 using the mingw environment.
27
 
 * Manually edited based on linux version as generated by autoconf.
28
 
 *
29
 
 * config-win32.h is normally generated by copying
30
 
 * config-win32.h.in -> config-win32.h and replacing
31
 
 * [ampersand] VERSION [ampersand]
32
 
 * with the appropriate version #.  This is normally
33
 
 * done automatically by configure.ac
34
 
 */
35
 
 
36
 
#include <windows.h>
37
 
#include <winsock2.h>
38
 
#include "autodefs/defs.h"
39
 
 
40
 
#define sleep(x) Sleep((x)*1000)
41
 
 
42
 
#define random rand
43
 
#define srandom srand
44
 
 
45
 
typedef unsigned long in_addr_t;
46
 
 
47
 
#ifndef _SSIZE_T_
48
 
#define _SSIZE_T_
49
 
 typedef unsigned int ssize_t;
50
 
#endif
51
 
 
52
 
/* Append a label to program startup title */
53
 
/*#define DEBUG_LABEL "DEBUG1"*/
54
 
 
55
 
/* Should we print debug info from driver? */
56
 
#ifdef PRODUCT_TAP_DEBUG
57
 
#define TAP_WIN32_DEBUG
58
 
#endif
59
 
 
60
 
/*
61
 
 * Minimum TAP-Win32 version number expected by userspace
62
 
 *
63
 
 * The TAP-Win32 version number is defined in tap-win32/SOURCES
64
 
 */
65
 
#define TAP_ID @TAP_ID@
66
 
#define TAP_WIN32_MIN_MAJOR @TAP_WIN32_MIN_MAJOR@
67
 
#define TAP_WIN32_MIN_MINOR @TAP_WIN32_MIN_MINOR@
68
 
 
69
 
/* Enable client/server capability */
70
 
#define ENABLE_CLIENT_SERVER 1
71
 
 
72
 
/* Enable client capability only */
73
 
/* #undef ENABLE_CLIENT_ONLY */
74
 
 
75
 
/* Enable management server capability */
76
 
#define ENABLE_MANAGEMENT 1
77
 
 
78
 
/* Enable PKCS#11 support */
79
 
#define USE_PKCS11 1
80
 
 
81
 
/* Enable HTTP proxy support */
82
 
#define ENABLE_HTTP_PROXY 1
83
 
 
84
 
/* Enable Socks proxy support */
85
 
#define ENABLE_SOCKS 1
86
 
 
87
 
/* Enable internal fragmentation support */
88
 
#define ENABLE_FRAGMENT 1
89
 
 
90
 
/* Enable smaller executable size */
91
 
/* #undef ENABLE_SMALL */
92
 
 
93
 
/* Enable debugging support */
94
 
#define ENABLE_DEBUG 1
95
 
 
96
 
/* if defined, will allow usage of the --plugin directive */
97
 
#define USE_LOAD_LIBRARY
98
 
 
99
 
/* Dimension size to use for empty array declaration */
100
 
#define EMPTY_ARRAY_SIZE 0
101
 
 
102
 
/* Define to 1 if you have the `getsockname' function. */
103
 
#define HAVE_GETSOCKNAME 1
104
 
 
105
 
/* Define to 1 if you have the <openssl/engine.h> header file. */
106
 
#define HAVE_OPENSSL_ENGINE_H 1
107
 
 
108
 
/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */
109
 
#define HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1
110
 
 
111
 
/* Define to 1 if you have the `ENGINE_register_all_complete' function. */
112
 
#define HAVE_ENGINE_REGISTER_ALL_COMPLETE 1
113
 
 
114
 
/* Define to 1 if you have the `ENGINE_cleanup' function. */
115
 
#define HAVE_ENGINE_CLEANUP 1
116
 
 
117
 
/* gettimeofday() is implemented in otime.c for Windows */
118
 
#define HAVE_GETTIMEOFDAY 1
119
 
 
120
 
/* Define to 1 if you have the 'chsize' function. */
121
 
#define HAVE_CHSIZE 1
122
 
 
123
 
/* Define to 1 if you have the `chdir' function. */
124
 
#define HAVE_CHDIR 1
125
 
 
126
 
/* Define to 1 if your compiler supports GNU GCC-style variadic macros */
127
 
#ifndef _MSC_VER /* Defines MSFT compiler version. Defined as 1200 for MSVC++ 6.0. */
128
 
#define HAVE_CPP_VARARG_MACRO_GCC 1
129
 
#endif
130
 
 
131
 
/* Define to 1 if you have the <ctype.h> header file. */
132
 
#define HAVE_CTYPE_H 1
133
 
 
134
 
/* Define to 1 if you have the <errno.h> header file. */
135
 
#define HAVE_ERRNO_H 1
136
 
 
137
 
/* Define to 1 if you have the `EVP_CIPHER_CTX_set_key_length' function. */
138
 
#define HAVE_EVP_CIPHER_CTX_SET_KEY_LENGTH 1
139
 
 
140
 
/* Define to 1 if you have the <fcntl.h> header file. */
141
 
#define HAVE_FCNTL_H 1
142
 
 
143
 
/* Define to 1 if you have the `getsockopt' function. */
144
 
#define HAVE_GETSOCKOPT 1
145
 
 
146
 
/* Define to 1 if you have the `inet_ntoa' function. */
147
 
#define HAVE_INET_NTOA 1
148
 
 
149
 
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
150
 
   to 0 otherwise. */
151
 
#define HAVE_MALLOC 1
152
 
 
153
 
/* Define to 1 if you have the `memset' function. */
154
 
#define HAVE_MEMSET 1
155
 
 
156
 
/* Define to 1 if you have the `setsockopt' function. */
157
 
#define HAVE_SETSOCKOPT 1
158
 
 
159
 
/* Define to 1 if you have the `socket' function. */
160
 
#define HAVE_SOCKET 1
161
 
 
162
 
/* Define to 1 if you have the <stdarg.h> header file. */
163
 
#define HAVE_STDARG_H 1
164
 
 
165
 
/* Define to 1 if you have the <stdint.h> header file. */
166
 
#ifndef _MSC_VER
167
 
#define HAVE_STDINT_H 1
168
 
#endif
169
 
 
170
 
/* Define to 1 if you have the <stdio.h> header file. */
171
 
#define HAVE_STDIO_H 1
172
 
 
173
 
/* Define to 1 if you have the <stdlib.h> header file. */
174
 
#define HAVE_STDLIB_H 1
175
 
 
176
 
/* Define to 1 if you have the `strerror' function. */
177
 
#define HAVE_STRERROR 1
178
 
 
179
 
/* Define to 1 if you have the <strings.h> header file. */
180
 
#define HAVE_STRINGS_H 1
181
 
 
182
 
/* Define to 1 if you have the <string.h> header file. */
183
 
#define HAVE_STRING_H 1
184
 
 
185
 
/* Define to 1 if you have the `system' function. */
186
 
#define HAVE_SYSTEM 1
187
 
 
188
 
/* Define to 1 if you have the <sys/file.h> header file. */
189
 
#ifndef _MSC_VER
190
 
#define HAVE_SYS_FILE_H 1
191
 
#endif
192
 
 
193
 
/* Define to 1 if you have the <sys/stat.h> header file. */
194
 
#define HAVE_SYS_STAT_H 1
195
 
 
196
 
/* Define to 1 if you have the <sys/time.h> header file. */
197
 
#ifndef _MSC_VER
198
 
#define HAVE_SYS_TIME_H 1
199
 
#endif
200
 
 
201
 
/* Define to 1 if you have the <sys/types.h> header file. */
202
 
#define HAVE_SYS_TYPES_H 1
203
 
 
204
 
/* Define to 1 if you have the `time' function. */
205
 
#define HAVE_TIME 1
206
 
 
207
 
/* Define to 1 if you have the <unistd.h> header file. */
208
 
#ifndef _MSC_VER
209
 
#define HAVE_UNISTD_H 1
210
 
#endif
211
 
 
212
 
/* Define to 1 if you have the `vsnprintf' function. */
213
 
#define HAVE_VSNPRINTF 1
214
 
 
215
 
/* Special Windows version of getpass() defined in io.c */
216
 
#define HAVE_GETPASS 1
217
 
 
218
 
/* Name of package */
219
 
#define PACKAGE @PACKAGE@
220
 
 
221
 
/* Define to the address where bug reports for this package should be sent. */
222
 
//#define PACKAGE_BUGREPORT "openvpn-users@lists.sourceforge.net"
223
 
 
224
 
/* Define to the full name of this package. */
225
 
#define PACKAGE_NAME @PACKAGE_NAME@
226
 
 
227
 
/* Define to the one symbol short name of this package. */
228
 
#define PACKAGE_TARNAME @PACKAGE_TARNAME@
229
 
 
230
 
/* Define to the version of this package. */
231
 
#define PACKAGE_VERSION @PACKAGE_VERSION@
232
 
 
233
 
/* Define to the full name and version of this package. */
234
 
#ifdef DEBUG_LABEL
235
 
#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION " " DEBUG_LABEL
236
 
#else
237
 
#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION
238
 
#endif
239
 
 
240
 
/* Define as the return type of signal handlers (`int' or `void'). */
241
 
#define RETSIGTYPE void
242
 
 
243
 
/* The size of a `unsigned int', as computed by sizeof. */
244
 
#define SIZEOF_UNSIGNED_INT 4
245
 
 
246
 
/* The size of a `unsigned long', as computed by sizeof. */
247
 
#define SIZEOF_UNSIGNED_LONG 4
248
 
 
249
 
/* Define to 1 if you have the ANSI C header files. */
250
 
#define STDC_HEADERS 1
251
 
 
252
 
/* A string representing our target */
253
 
#ifdef _MSC_VER
254
 
#define TARGET_ALIAS "Win32-MSVC++"
255
 
#else
256
 
#define TARGET_ALIAS "Win32-MinGW"
257
 
#endif
258
 
 
259
 
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
260
 
#ifndef _MSC_VER
261
 
#define TIME_WITH_SYS_TIME 1
262
 
#endif
263
 
 
264
 
/* Use OpenSSL crypto library */
265
 
#define USE_CRYPTO 1
266
 
 
267
 
/* Use LZO compression library */
268
 
#define USE_LZO 1
269
 
 
270
 
/* LZO version number */
271
 
#define LZO_VERSION_NUM "2"
272
 
 
273
 
/* Use lzo/ directory prefix for LZO header files (for LZO 2.0) */
274
 
#define LZO_HEADER_DIR 1
275
 
 
276
 
/* Use OpenSSL SSL library */
277
 
#define USE_SSL 1
278
 
 
279
 
/* Version number of package */
280
 
#define VERSION PACKAGE_VERSION
281
 
 
282
 
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
283
 
   if it is not supported. */
284
 
#define inline __inline
285
 
 
286
 
/* type to use in place of socklen_t if not defined */
287
 
#define socklen_t unsigned int
288
 
 
289
 
/* 32-bit unsigned type */
290
 
#define uint32_t unsigned int
291
 
 
292
 
/* 16-bit unsigned type */
293
 
#define uint16_t unsigned short
294
 
 
295
 
/* 8-bit unsigned type */
296
 
#define uint8_t unsigned char
297
 
 
298
 
/* Route command */
299
 
#define ROUTE_PATH "route"
300
 
 
301
 
/* Windows doesn't support PTHREAD yet */
302
 
#ifdef USE_PTHREAD
303
 
#error The Windows version of OpenVPN does not support PTHREAD yet
304
 
#endif
305
 
 
306
 
#ifdef _MSC_VER
307
 
/* MSVC++ hacks */
308
 
#include <io.h>
309
 
#include <direct.h>
310
 
#define vsnprintf _vsnprintf
311
 
#define vsnwprintf _vsnwprintf
312
 
#define snwprintf _snwprintf
313
 
#define write _write
314
 
#define open _open
315
 
#define read _read
316
 
#define close _close
317
 
#define chdir _chdir
318
 
#define S_IRUSR 0
319
 
#define S_IWUSR 0
320
 
typedef int intptr_t;
321
 
/* Visual Studio 2005 supports vararg macros */
322
 
#if _MSC_VER >= 1400
323
 
#define HAVE_CPP_VARARG_MACRO_ISO 1
324
 
#endif
325
 
#endif