Browse code

build: win-msvc: msbuild format

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>

Alon Bar-Lev authored on 2012/03/01 05:12:12
Showing 29 changed files
... ...
@@ -2,12 +2,18 @@
2 2
 *.dll
3 3
 *.exe
4 4
 *.exe.*
5
-*.mak
6 5
 *.obj
7 6
 *.pyc
8 7
 *.so
9 8
 *~
10 9
 *.idb
10
+*.suo
11
+*.ncb
12
+*.vcproj.*
13
+*.log
14
+Release
15
+Debug
16
+Win32-Output
11 17
 .deps
12 18
 Makefile
13 19
 Makefile.in
... ...
@@ -33,6 +39,9 @@ m4/ltsugar.m4
33 33
 m4/ltversion.m4
34 34
 m4/lt~obsolete.m4
35 35
 
36
+msvc-env-local.bat
37
+config-msvc-local.h
38
+config-msvc-version.h
36 39
 doc/openvpn.8.html
37 40
 distro/rpm/openvpn.spec
38 41
 tests/t_client.sh
... ...
@@ -54,10 +54,18 @@ dist_noinst_DATA = \
54 54
 	.gitignore \
55 55
 	PORTS \
56 56
 	README.IPv6 TODO.IPv6 \
57
-	README.polarssl
57
+	README.polarssl \
58
+	openvpn.sln \
59
+	msvc-env.bat \
60
+	msvc-dev.bat \
61
+	msvc-build.bat
58 62
 
59 63
 if WIN32
60 64
 dist_doc_DATA += INSTALL-win32.txt
61 65
 else
62 66
 dist_noinst_DATA += INSTALL-win32.txt
63 67
 endif
68
+
69
+dist_noinst_HEADERS = \
70
+	config-msvc.h \
71
+	config-msvc-version.h.in
... ...
@@ -13,3 +13,5 @@ MAINTAINERCLEANFILES = \
13 13
 
14 14
 EXTRA_DIST = \
15 15
 	ltrc.inc
16
+
17
+SUBDIRS = msvc
16 18
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+#
1
+#  OpenVPN -- An application to securely tunnel IP networks
2
+#             over a single UDP port, with support for SSL/TLS-based
3
+#             session authentication and key exchange,
4
+#             packet encryption, packet authentication, and
5
+#             packet compression.
6
+#
7
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
8
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
9
+#
10
+
11
+MAINTAINERCLEANFILES = \
12
+	$(srcdir)/Makefile.in
13
+
14
+SUBDIRS = msvc-generate
0 15
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+#
1
+#  OpenVPN -- An application to securely tunnel IP networks
2
+#             over a single UDP port, with support for SSL/TLS-based
3
+#             session authentication and key exchange,
4
+#             packet encryption, packet authentication, and
5
+#             packet compression.
6
+#
7
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
8
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
9
+#
10
+
11
+MAINTAINERCLEANFILES = \
12
+	$(srcdir)/Makefile.in
13
+
14
+dist_noinst_DATA = \
15
+	msvc-generate.vcproj \
16
+	Makefile.mak \
17
+	msvc-generate.js
0 18
new file mode 100755
... ...
@@ -0,0 +1,13 @@
0
+# Copyright (C) 2008-2012 Alon Bar-Lev <alon.barlev@gmail.com>
1
+
2
+CONFIG=$(SOURCEBASE)/version.m4
3
+INPUT=$(SOURCEBASE)/config-msvc-version.h.in
4
+OUTPUT=$(SOURCEBASE)/config-msvc-version.h
5
+
6
+all:	$(OUTPUT)
7
+
8
+$(OUTPUT): $(INPUT) $(CONFIG)
9
+	cscript //nologo msvc-generate.js --config="$(CONFIG)" --input="$(INPUT)" --output="$(OUTPUT)"
10
+
11
+clean:
12
+	-del "$(OUTPUT)"
0 13
new file mode 100644
... ...
@@ -0,0 +1,118 @@
0
+/*
1
+ * msvc-generate.js  - string transformation
2
+ *
3
+ * Copyright (C) 2008-2012 Alon Bar-Lev <alon.barlev@gmail.com>
4
+ *
5
+ * BSD License
6
+ * ============
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ *
10
+ *     o Redistributions of source code must retain the above copyright notice,
11
+ *       this list of conditions and the following disclaimer.
12
+ *     o Redistributions in binary form must reproduce the above copyright
13
+ *       notice, this list of conditions and the following disclaimer in the
14
+ *       documentation and/or other materials provided with the distribution.
15
+ *     o Neither the name of the Alon Bar-Lev nor the names of its
16
+ *       contributors may be used to endorse or promote products derived from
17
+ *       this software without specific prior written permission.
18
+ *
19
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ * POSSIBILITY OF SUCH DAMAGE.
30
+ *
31
+ */
32
+
33
+var ForReading = 1;
34
+var fso = new ActiveXObject("Scripting.FileSystemObject");
35
+var input = "nul";
36
+var output = "nul";
37
+var files = new Array();
38
+var env = new Array();
39
+
40
+function initialize() {
41
+	for (var i=0;i<WScript.Arguments.length;i++) {
42
+		var arg = WScript.Arguments(i);
43
+		if (arg.match(/^--input=(.*)$/)) {
44
+			input=RegExp.$1;
45
+		}
46
+		else if (arg.match(/^--output=(.*)$/)) {
47
+			output=RegExp.$1;
48
+		}
49
+		else if (arg.match(/^--config=(.*)$/)) {
50
+			files.push(RegExp.$1);
51
+		}
52
+		else if (arg.match(/^--var=([^=]*)=(.*)$/)) {
53
+			env[RegExp.$1] = RegExp.$2;
54
+		}
55
+	}
56
+}
57
+
58
+function process_config(vars, file) {
59
+	try {
60
+		var fin = fso.OpenTextFile(file, ForReading);
61
+
62
+		while (!fin.AtEndOfStream) {
63
+			var content = fin.ReadLine();
64
+			if (content.match(/^[ \t]*define\(\[(.*)\],[ \t]*\[(.*)\]\)[ \t]*/)) {
65
+				vars[RegExp.$1] = RegExp.$2;
66
+			}
67
+		}
68
+	}
69
+	catch(e) {
70
+		throw new Error(1, "Cannot process '" + file + "'.");
71
+	}
72
+}
73
+
74
+function process_file(vars, input, output) {
75
+	var fin = fso.OpenTextFile(input, ForReading);
76
+	var fout = fso.CreateTextFile(output);
77
+	var content = fin.ReadAll();
78
+
79
+	for (var i in vars) {
80
+		content = content.replace(new RegExp("@"+i+"@", "g"), vars[i]);
81
+	}
82
+
83
+	fout.Write(content);
84
+}
85
+
86
+function build_vars() {
87
+	var vars = new Array();
88
+	for (var f in files) {
89
+		process_config(vars, files[f]);
90
+	}
91
+	for (var e in env) {
92
+		vars[e] = env[e];
93
+	}
94
+	return vars;
95
+}
96
+
97
+function main() {
98
+	try {
99
+		initialize();
100
+
101
+		var vars = build_vars();
102
+
103
+		process_file(
104
+			vars,
105
+			input,
106
+			output
107
+		);
108
+
109
+		WScript.Quit(0);
110
+	}
111
+	catch(e) {
112
+		WScript.Echo("ERROR: when procssing " + output + ": " + e.description);
113
+		WScript.Quit(1);
114
+	}
115
+}
116
+
117
+main();
0 118
new file mode 100644
... ...
@@ -0,0 +1,74 @@
0
+<?xml version="1.0" encoding="Windows-1252"?>
1
+<VisualStudioProject
2
+	ProjectType="Visual C++"
3
+	Version="9.00"
4
+	Name="msvc-generate"
5
+	ProjectGUID="{8598C2C8-34C4-47A1-99B0-7C295A890615}"
6
+	RootNamespace="msvc-generate"
7
+	Keyword="MakeFileProj"
8
+	TargetFrameworkVersion="196613"
9
+	>
10
+	<Platforms>
11
+		<Platform
12
+			Name="Win32"
13
+		/>
14
+	</Platforms>
15
+	<ToolFiles>
16
+	</ToolFiles>
17
+	<Configurations>
18
+		<Configuration
19
+			Name="Debug|Win32"
20
+			OutputDirectory="$(ConfigurationName)"
21
+			IntermediateDirectory="$(ConfigurationName)"
22
+			ConfigurationType="0"
23
+			>
24
+			<Tool
25
+				Name="VCNMakeTool"
26
+				BuildCommandLine="nmake -f Makefile.mak all"
27
+				ReBuildCommandLine="nmake -f Makefile.mak clean all"
28
+				CleanCommandLine="nmake -f Makefile.mak clean"
29
+				Output="config-msvc-version.h"
30
+				PreprocessorDefinitions="WIN32;_DEBUG"
31
+				IncludeSearchPath=""
32
+				ForcedIncludes=""
33
+				AssemblySearchPath=""
34
+				ForcedUsingAssemblies=""
35
+				CompileAsManaged=""
36
+			/>
37
+		</Configuration>
38
+		<Configuration
39
+			Name="Release|Win32"
40
+			OutputDirectory="$(ConfigurationName)"
41
+			IntermediateDirectory="$(ConfigurationName)"
42
+			ConfigurationType="0"
43
+			>
44
+			<Tool
45
+				Name="VCNMakeTool"
46
+				BuildCommandLine="nmake -f Makefile.mak all"
47
+				ReBuildCommandLine="nmake -f Makefile.mak clean all"
48
+				CleanCommandLine="nmake -f Makefile.mak clean"
49
+				Output="config-msvc-version.h"
50
+				PreprocessorDefinitions="WIN32;NDEBUG"
51
+				IncludeSearchPath=""
52
+				ForcedIncludes=""
53
+				AssemblySearchPath=""
54
+				ForcedUsingAssemblies=""
55
+				CompileAsManaged=""
56
+			/>
57
+		</Configuration>
58
+	</Configurations>
59
+	<References>
60
+	</References>
61
+	<Files>
62
+		<File
63
+			RelativePath=".\Makefile.mak"
64
+			>
65
+		</File>
66
+		<File
67
+			RelativePath=".\msc-generate.js"
68
+			>
69
+		</File>
70
+	</Files>
71
+	<Globals>
72
+	</Globals>
73
+</VisualStudioProject>
0 74
new file mode 100644
... ...
@@ -0,0 +1,10 @@
0
+#define PACKAGE_NAME "@PRODUCT_NAME@"
1
+#define PACKAGE_STRING "@PRODUCT_NAME@ @PRODUCT_VERSION@"
2
+#define PACKAGE_TARNAME "@PRODUCT_TARNAME@"
3
+#define PACKAGE "@PRODUCT_TARNAME@"
4
+#define PACKAGE_VERSION "@PRODUCT_VERSION@"
5
+#define PRODUCT_BUGREPORT "@PRODUCT_BUGREPORT@"
6
+#define OPENVPN_VERSION_RESOURCE @PRODUCT_VERSION_RESOURCE@
7
+#define TAP_WIN_COMPONENT_ID "@PRODUCT_TAP_WIN_COMPONENT_ID@"
8
+#define TAP_WIN_MIN_MAJOR @PRODUCT_TAP_WIN_MIN_MAJOR@
9
+#define TAP_WIN_MIN_MINOR @PRODUCT_TAP_WIN_MIN_MINOR@
0 10
new file mode 100644
... ...
@@ -0,0 +1,122 @@
0
+#include <config-msvc-version.h>
1
+
2
+#define CONFIGURE_DEFINES "N/A"
3
+
4
+#define ENABLE_DEF_AUTH 1
5
+#define ENABLE_PF 1
6
+#define ENABLE_CLIENT_SERVER 1
7
+#define ENABLE_CRYPTO 1
8
+#define ENABLE_CRYPTO_OPENSSL 1
9
+#define ENABLE_DEBUG 1
10
+#define ENABLE_EUREPHIA 1
11
+#define ENABLE_FRAGMENT 1
12
+#define ENABLE_HTTP_PROXY 1
13
+#define ENABLE_LZO 1
14
+#define ENABLE_MANAGEMENT 1
15
+#define ENABLE_MULTIHOME 1
16
+#define ENABLE_PKCS11 1
17
+#define ENABLE_PLUGIN 1
18
+#define ENABLE_PORT_SHARE 1
19
+#define ENABLE_SOCKS 1
20
+#define ENABLE_SSL 1
21
+
22
+#define HAVE_ERRNO_H 1
23
+#define HAVE_FCNTL_H 1
24
+#define HAVE_CTYPE_H 1
25
+#define HAVE_STDARG_H 1
26
+#define HAVE_STDIO_H 1
27
+#define HAVE_STDLIB_H 1
28
+#define HAVE_STRDUP 1
29
+#define HAVE_STRERROR 1
30
+#define HAVE_STRINGS_H 1
31
+#define HAVE_STRING_H 1
32
+#define HAVE_SYSTEM 1
33
+#define HAVE_TIME 1
34
+#define HAVE_TIME_H 1
35
+#define HAVE_UNLINK 1
36
+#define HAVE_VSNPRINTF 1
37
+#define HAVE_WINDOWS_H 1
38
+#define HAVE_WINSOCK2_H 1
39
+#define HAVE_WS2TCPIP_H 1
40
+#define HAVE_IO_H 1
41
+#define HAVE_DIRECT_H 1
42
+#define HAVE_SYS_TYPES_H 1
43
+#define HAVE_SYS_STAT_H 1
44
+#define HAVE_LZO_LZO1X_H 1
45
+#define HAVE_LZO_LZOUTIL_H 1
46
+
47
+#define HAVE_ACCESS 1
48
+#define HAVE_CHDIR 1
49
+#define HAVE_CHSIZE 1
50
+#define HAVE_CPP_VARARG_MACRO_ISO 1
51
+#define HAVE_CTIME 1
52
+#define HAVE_EVP_CIPHER_CTX_SET_KEY_LENGTH 1
53
+#define HAVE_GETTIMEOFDAY 1
54
+#define HAVE_IN_PKTINFO 1
55
+#define HAVE_MEMSET 1
56
+#define HAVE_PUTENV 1
57
+#define HAVE_STAT 1
58
+
59
+#define HAVE_SOCKET 1
60
+#define HAVE_RECV 1
61
+#define HAVE_RECVFROM 1
62
+#define HAVE_SEND 1
63
+#define HAVE_SENDTO 1
64
+#define HAVE_LISTEN 1
65
+#define HAVE_ACCEPT 1
66
+#define HAVE_CONNECT 1
67
+#define HAVE_BIND 1
68
+#define HAVE_SELECT 1
69
+#define HAVE_GETHOSTBYNAME 1
70
+#define HAVE_INET_NTOA 1
71
+#define HAVE_SETSOCKOPT 1
72
+#define HAVE_GETSOCKOPT 1
73
+#define HAVE_GETSOCKNAME 1
74
+#define HAVE_POLL 1
75
+
76
+#define HAVE_OPENSSL_ENGINE 1
77
+
78
+#ifndef __cplusplus
79
+#define inline __inline
80
+#endif
81
+
82
+#define EMPTY_ARRAY_SIZE 0
83
+#define TARGET_WIN32 1
84
+#define TARGET_ALIAS "Windows-MSVC"
85
+
86
+#define HAVE_DECL_SO_MARK 0
87
+
88
+#define strncasecmp strnicmp
89
+#define strcasecmp _stricmp
90
+#define snprintf _snprintf
91
+#define strtoull strtoul
92
+
93
+#define in_addr_t uint32_t
94
+#define ssize_t SSIZE_T
95
+
96
+#define S_IRUSR 0
97
+#define S_IWUSR 0
98
+#define R_OK 4
99
+#define W_OK 2
100
+#define X_OK 1
101
+#define F_OK 0
102
+
103
+#define SIGHUP    1
104
+#define SIGINT    2
105
+#define SIGUSR1   10
106
+#define SIGUSR2   12
107
+#define SIGTERM   15
108
+
109
+typedef unsigned __int64	uint64_t;
110
+typedef unsigned __int32	uint32_t;
111
+typedef unsigned __int16	uint16_t;
112
+typedef unsigned __int8		uint8_t;
113
+typedef __int64		int64_t;
114
+typedef __int32		int32_t;
115
+typedef __int16		int16_t;
116
+typedef __int8		int8_t;
117
+
118
+#ifdef HAVE_CONFIG_MSVC_LOCAL_H
119
+#include <config-msvc-local.h>
120
+#endif
121
+
... ...
@@ -282,7 +282,8 @@ case "$host" in
282 282
 	*-mingw*)
283 283
 		AC_DEFINE([TARGET_WIN32], [1], [Are we running WIN32?])
284 284
 		AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["W"], [Target prefix])
285
-		CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501"
285
+		CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN"
286
+		CPPFLAGS="${CPPFLAGS} -DNTDDI_VERSION=NTDDI_WINXP -D_WIN32_WINNT=_WIN32_WINNT_WINXP"
286 287
 		WIN32=yes
287 288
 		;;
288 289
 	*-*-dragonfly*)
... ...
@@ -906,6 +907,8 @@ AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
906 906
 AC_CONFIG_FILES([
907 907
 	Makefile
908 908
 	build/Makefile
909
+	build/msvc/Makefile
910
+	build/msvc/msvc-generate/Makefile
909 911
 	distro/Makefile
910 912
 	distro/rpm/Makefile
911 913
 	distro/rpm/openvpn.spec
912 914
new file mode 100644
... ...
@@ -0,0 +1,34 @@
0
+@echo off
1
+
2
+rem Copyright (C) 2008-2012 Alon Bar-Lev <alon.barlev@gmail.com>
3
+
4
+call msvc-env.bat
5
+
6
+@rem this stupid command needed for SetEnv.cmd to operate
7
+setlocal ENABLEDELAYEDEXPANSION
8
+
9
+set PLATFORMS=Win32
10
+set CONFIGURATIONS=Release
11
+
12
+call "%VCHOME%\bin\vcvars32.bat"
13
+
14
+for %%p in (%PLATFORMS%) do (
15
+	for %%c in (%CONFIGURATIONS%) do (
16
+		rmdir /q /s %SOURCEBASE%\%%p\%%c > nul 2>&1
17
+
18
+		vcbuild /errfile:error.log /showenv %SOLUTION% /rebuild /platform:%%p "%%c|%%p"
19
+		for %%f in (error.log) do if %%~zf GTR 0 goto error
20
+	)
21
+)
22
+
23
+exit /b 0
24
+goto end
25
+
26
+:error
27
+if "%1" NEQ "batch" pause
28
+exit /b 1
29
+goto end
30
+
31
+:end
32
+
33
+endlocal
0 34
new file mode 100644
... ...
@@ -0,0 +1,9 @@
0
+@echo off
1
+
2
+setlocal
3
+cd %0\..
4
+call msvc-env.bat
5
+
6
+start "" "%VSHOME%\Common7\IDE\devenv.exe" %SOLUTION%
7
+
8
+endlocal
0 9
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+@echo off
1
+
2
+cd %0\..
3
+
4
+rem Put your own settings at msvc-env-local.bat
5
+if exist msvc-env-local.bat call msvc-env-local.bat
6
+
7
+if "%ProgramFiles(x86)%"=="" set ProgramFiles(x86)=%ProgramFiles%
8
+if "%VS90COMNTOOLS%"=="" set VS90COMNTOOLS=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\Common7\Tools\
9
+if "%VSHOME%"=="" set VSHOME=%VS90COMNTOOLS%..\..
10
+if "%VCHOME%"=="" set VCHOME=%VSHOME%\VC
11
+
12
+set SOURCEBASE=%cd%
13
+set SOLUTION=openvpn.sln
14
+set CPPFLAGS=%CPPFLAGS%;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS
15
+set CPPFLAGS=%CPPFLAGS%;NTDDI_VERSION=NTDDI_WINXP;_WIN32_WINNT=_WIN32_WINNT_WINXP
16
+set CPPFLAGS=%CPPFLAGS%;_USE_32BIT_TIME_T
17
+set CPPFLAGS=%CPPFLAGS%;%EXTRA_CPPFLAGS%
18
+
19
+if exist config-msvc-local.h set CPPFLAGS="%CPPFLAGS%;HAVE_CONFIG_MSVC_LOCAL_H"
20
+
21
+if "%OPENVPN_DEPROOT%" == "" set OPENVPN_DEPROOT=c:\Temp\openvpn-deps
22
+if "%OPENSSL_HOME%" == "" set OPENSSL_HOME=%OPENVPN_DEPROOT%
23
+if "%LZO_HOME%" == "" set LZO_HOME=%OPENVPN_DEPROOT%
24
+if "%PKCS11H_HOME%" == "" set PKCS11H_HOME=%OPENVPN_DEPROOT%
25
+
26
+if not exist "%OPENSSL_HOME%" echo WARNING: openssl '%OPENSSL_HOME%' does not exist
27
+if not exist "%LZO_HOME%" echo WARNING: lzo '%LZO_HOME%' does not exist
28
+if not exist "%PKCS11H_HOME%" echo WARNING: pkcs11-helper '%PKCS11H_HOME%' does not exist
0 29
new file mode 100644
... ...
@@ -0,0 +1,45 @@
0
+
1
+Microsoft Visual Studio Solution File, Format Version 10.00
2
+# Visual Studio 2008
3
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvpnserv", "src\openvpnserv\openvpnserv.vcproj", "{9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}"
4
+	ProjectSection(ProjectDependencies) = postProject
5
+		{8598C2C8-34C4-47A1-99B0-7C295A890615} = {8598C2C8-34C4-47A1-99B0-7C295A890615}
6
+	EndProjectSection
7
+EndProject
8
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvpn", "src\openvpn\openvpn.vcproj", "{29DF226E-4D4E-440F-ADAF-5829CFD4CA94}"
9
+	ProjectSection(ProjectDependencies) = postProject
10
+		{8598C2C8-34C4-47A1-99B0-7C295A890615} = {8598C2C8-34C4-47A1-99B0-7C295A890615}
11
+	EndProjectSection
12
+EndProject
13
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{1AA03DE8-3F08-45B9-B4ED-D7769A445DF3}"
14
+	ProjectSection(SolutionItems) = preProject
15
+		config-msvc-version.h.in = config-msvc-version.h.in
16
+		config-msvc.h = config-msvc.h
17
+		version.m4 = version.m4
18
+	EndProjectSection
19
+EndProject
20
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-generate", "build\msvc\msvc-generate\msvc-generate.vcproj", "{8598C2C8-34C4-47A1-99B0-7C295A890615}"
21
+EndProject
22
+Global
23
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
24
+		Debug|Win32 = Debug|Win32
25
+		Release|Win32 = Release|Win32
26
+	EndGlobalSection
27
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
28
+		{9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Debug|Win32.ActiveCfg = Debug|Win32
29
+		{9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Debug|Win32.Build.0 = Debug|Win32
30
+		{9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Release|Win32.ActiveCfg = Release|Win32
31
+		{9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Release|Win32.Build.0 = Release|Win32
32
+		{29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Debug|Win32.ActiveCfg = Debug|Win32
33
+		{29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Debug|Win32.Build.0 = Debug|Win32
34
+		{29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Release|Win32.ActiveCfg = Release|Win32
35
+		{29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Release|Win32.Build.0 = Release|Win32
36
+		{8598C2C8-34C4-47A1-99B0-7C295A890615}.Debug|Win32.ActiveCfg = Debug|Win32
37
+		{8598C2C8-34C4-47A1-99B0-7C295A890615}.Debug|Win32.Build.0 = Debug|Win32
38
+		{8598C2C8-34C4-47A1-99B0-7C295A890615}.Release|Win32.ActiveCfg = Release|Win32
39
+		{8598C2C8-34C4-47A1-99B0-7C295A890615}.Release|Win32.Build.0 = Release|Win32
40
+	EndGlobalSection
41
+	GlobalSection(SolutionProperties) = preSolution
42
+		HideSolutionNode = FALSE
43
+	EndGlobalSection
44
+EndGlobal
... ...
@@ -14,6 +14,9 @@ include $(top_srcdir)/build/ltrc.inc
14 14
 MAINTAINERCLEANFILES = \
15 15
 	$(srcdir)/Makefile.in
16 16
 
17
+EXTRA_DIST = \
18
+	openvpn.vcproj
19
+
17 20
 INCLUDES = -I$(top_srcdir)/include
18 21
 
19 22
 AM_CFLAGS = \
... ...
@@ -25,8 +25,6 @@
25 25
 #ifndef COMPAT_H
26 26
 #define COMPAT_H
27 27
 
28
-#include "config.h"
29
-
30 28
 #if defined(HAVE_BASENAME) || defined(HAVE_DIRNAME)
31 29
 #include <libgen.h>
32 30
 #endif
... ...
@@ -30,8 +30,6 @@
30 30
 #ifndef CRYPTO_BACKEND_H_
31 31
 #define CRYPTO_BACKEND_H_
32 32
 
33
-#include "config.h"
34
-
35 33
 #ifdef ENABLE_CRYPTO_OPENSSL
36 34
 #include "crypto_openssl.h"
37 35
 #endif
38 36
new file mode 100644
... ...
@@ -0,0 +1,769 @@
0
+<?xml version="1.0" encoding="Windows-1252"?>
1
+<VisualStudioProject
2
+	ProjectType="Visual C++"
3
+	Version="9.00"
4
+	Name="openvpn"
5
+	ProjectGUID="{29DF226E-4D4E-440F-ADAF-5829CFD4CA94}"
6
+	RootNamespace="openvpn"
7
+	Keyword="Win32Proj"
8
+	TargetFrameworkVersion="196613"
9
+	>
10
+	<Platforms>
11
+		<Platform
12
+			Name="Win32"
13
+		/>
14
+	</Platforms>
15
+	<ToolFiles>
16
+	</ToolFiles>
17
+	<Configurations>
18
+		<Configuration
19
+			Name="Debug|Win32"
20
+			OutputDirectory="$(SolutionDir)$(PlatformName)-Output\$(ConfigurationName)"
21
+			IntermediateDirectory="$(ConfigurationName)"
22
+			ConfigurationType="1"
23
+			CharacterSet="2"
24
+			>
25
+			<Tool
26
+				Name="VCPreBuildEventTool"
27
+			/>
28
+			<Tool
29
+				Name="VCCustomBuildTool"
30
+			/>
31
+			<Tool
32
+				Name="VCXMLDataGeneratorTool"
33
+			/>
34
+			<Tool
35
+				Name="VCWebServiceProxyGeneratorTool"
36
+			/>
37
+			<Tool
38
+				Name="VCMIDLTool"
39
+			/>
40
+			<Tool
41
+				Name="VCCLCompilerTool"
42
+				Optimization="0"
43
+				AdditionalIncludeDirectories="$(SOURCEBASE);$(SOURCEBASE)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include"
44
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;$(CPPFLAGS)"
45
+				MinimalRebuild="true"
46
+				BasicRuntimeChecks="3"
47
+				RuntimeLibrary="3"
48
+				UsePrecompiledHeader="0"
49
+				WarningLevel="3"
50
+				DebugInformationFormat="4"
51
+			/>
52
+			<Tool
53
+				Name="VCManagedResourceCompilerTool"
54
+			/>
55
+			<Tool
56
+				Name="VCResourceCompilerTool"
57
+				AdditionalIncludeDirectories="$(SOURCEBASE)"
58
+			/>
59
+			<Tool
60
+				Name="VCPreLinkEventTool"
61
+			/>
62
+			<Tool
63
+				Name="VCLinkerTool"
64
+				AdditionalDependencies="libeay32.lib ssleay32.lib lzo2.lib pkcs11-helper.dll.lib gdi32.lib ws2_32.lib wininet.lib crypt32.lib iphlpapi.lib winmm.lib shell32.lib"
65
+				LinkIncremental="2"
66
+				AdditionalLibraryDirectories="$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib"
67
+				GenerateDebugInformation="true"
68
+				SubSystem="1"
69
+				TargetMachine="1"
70
+			/>
71
+			<Tool
72
+				Name="VCALinkTool"
73
+			/>
74
+			<Tool
75
+				Name="VCManifestTool"
76
+			/>
77
+			<Tool
78
+				Name="VCXDCMakeTool"
79
+			/>
80
+			<Tool
81
+				Name="VCBscMakeTool"
82
+			/>
83
+			<Tool
84
+				Name="VCFxCopTool"
85
+			/>
86
+			<Tool
87
+				Name="VCAppVerifierTool"
88
+			/>
89
+			<Tool
90
+				Name="VCPostBuildEventTool"
91
+			/>
92
+		</Configuration>
93
+		<Configuration
94
+			Name="Release|Win32"
95
+			OutputDirectory="$(SolutionDir)$(PlatformName)-Output\$(ConfigurationName)"
96
+			IntermediateDirectory="$(ConfigurationName)"
97
+			ConfigurationType="1"
98
+			CharacterSet="2"
99
+			WholeProgramOptimization="1"
100
+			>
101
+			<Tool
102
+				Name="VCPreBuildEventTool"
103
+			/>
104
+			<Tool
105
+				Name="VCCustomBuildTool"
106
+			/>
107
+			<Tool
108
+				Name="VCXMLDataGeneratorTool"
109
+			/>
110
+			<Tool
111
+				Name="VCWebServiceProxyGeneratorTool"
112
+			/>
113
+			<Tool
114
+				Name="VCMIDLTool"
115
+			/>
116
+			<Tool
117
+				Name="VCCLCompilerTool"
118
+				Optimization="2"
119
+				EnableIntrinsicFunctions="true"
120
+				AdditionalIncludeDirectories="$(SOURCEBASE);$(SOURCEBASE)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include"
121
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;$(CPPFLAGS)"
122
+				RuntimeLibrary="2"
123
+				EnableFunctionLevelLinking="true"
124
+				UsePrecompiledHeader="0"
125
+				WarningLevel="3"
126
+				DebugInformationFormat="3"
127
+			/>
128
+			<Tool
129
+				Name="VCManagedResourceCompilerTool"
130
+			/>
131
+			<Tool
132
+				Name="VCResourceCompilerTool"
133
+				AdditionalIncludeDirectories="$(SOURCEBASE)"
134
+			/>
135
+			<Tool
136
+				Name="VCPreLinkEventTool"
137
+			/>
138
+			<Tool
139
+				Name="VCLinkerTool"
140
+				AdditionalDependencies="libeay32.lib ssleay32.lib lzo2.lib pkcs11-helper.dll.lib gdi32.lib ws2_32.lib wininet.lib crypt32.lib iphlpapi.lib winmm.lib shell32.lib"
141
+				LinkIncremental="1"
142
+				AdditionalLibraryDirectories="$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib"
143
+				GenerateDebugInformation="true"
144
+				SubSystem="1"
145
+				OptimizeReferences="2"
146
+				EnableCOMDATFolding="2"
147
+				TargetMachine="1"
148
+			/>
149
+			<Tool
150
+				Name="VCALinkTool"
151
+			/>
152
+			<Tool
153
+				Name="VCManifestTool"
154
+			/>
155
+			<Tool
156
+				Name="VCXDCMakeTool"
157
+			/>
158
+			<Tool
159
+				Name="VCBscMakeTool"
160
+			/>
161
+			<Tool
162
+				Name="VCFxCopTool"
163
+			/>
164
+			<Tool
165
+				Name="VCAppVerifierTool"
166
+			/>
167
+			<Tool
168
+				Name="VCPostBuildEventTool"
169
+			/>
170
+		</Configuration>
171
+	</Configurations>
172
+	<References>
173
+	</References>
174
+	<Files>
175
+		<Filter
176
+			Name="Source Files"
177
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
178
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
179
+			>
180
+			<File
181
+				RelativePath=".\base64.c"
182
+				>
183
+			</File>
184
+			<File
185
+				RelativePath=".\buffer.c"
186
+				>
187
+			</File>
188
+			<File
189
+				RelativePath=".\clinat.c"
190
+				>
191
+			</File>
192
+			<File
193
+				RelativePath=".\compat.c"
194
+				>
195
+			</File>
196
+			<File
197
+				RelativePath=".\crypto.c"
198
+				>
199
+			</File>
200
+			<File
201
+				RelativePath=".\crypto_openssl.c"
202
+				>
203
+			</File>
204
+			<File
205
+				RelativePath=".\cryptoapi.c"
206
+				>
207
+			</File>
208
+			<File
209
+				RelativePath=".\dhcp.c"
210
+				>
211
+			</File>
212
+			<File
213
+				RelativePath=".\error.c"
214
+				>
215
+			</File>
216
+			<File
217
+				RelativePath=".\event.c"
218
+				>
219
+			</File>
220
+			<File
221
+				RelativePath=".\fdmisc.c"
222
+				>
223
+			</File>
224
+			<File
225
+				RelativePath=".\forward.c"
226
+				>
227
+			</File>
228
+			<File
229
+				RelativePath=".\fragment.c"
230
+				>
231
+			</File>
232
+			<File
233
+				RelativePath=".\gremlin.c"
234
+				>
235
+			</File>
236
+			<File
237
+				RelativePath=".\helper.c"
238
+				>
239
+			</File>
240
+			<File
241
+				RelativePath=".\httpdigest.c"
242
+				>
243
+			</File>
244
+			<File
245
+				RelativePath=".\init.c"
246
+				>
247
+			</File>
248
+			<File
249
+				RelativePath=".\interval.c"
250
+				>
251
+			</File>
252
+			<File
253
+				RelativePath=".\list.c"
254
+				>
255
+			</File>
256
+			<File
257
+				RelativePath=".\lladdr.c"
258
+				>
259
+			</File>
260
+			<File
261
+				RelativePath=".\lzo.c"
262
+				>
263
+			</File>
264
+			<File
265
+				RelativePath=".\manage.c"
266
+				>
267
+			</File>
268
+			<File
269
+				RelativePath=".\mbuf.c"
270
+				>
271
+			</File>
272
+			<File
273
+				RelativePath=".\misc.c"
274
+				>
275
+			</File>
276
+			<File
277
+				RelativePath=".\mroute.c"
278
+				>
279
+			</File>
280
+			<File
281
+				RelativePath=".\mss.c"
282
+				>
283
+			</File>
284
+			<File
285
+				RelativePath=".\mstats.c"
286
+				>
287
+			</File>
288
+			<File
289
+				RelativePath=".\mtcp.c"
290
+				>
291
+			</File>
292
+			<File
293
+				RelativePath=".\mtu.c"
294
+				>
295
+			</File>
296
+			<File
297
+				RelativePath=".\mudp.c"
298
+				>
299
+			</File>
300
+			<File
301
+				RelativePath=".\multi.c"
302
+				>
303
+			</File>
304
+			<File
305
+				RelativePath=".\ntlm.c"
306
+				>
307
+			</File>
308
+			<File
309
+				RelativePath=".\occ.c"
310
+				>
311
+			</File>
312
+			<File
313
+				RelativePath=".\openvpn.c"
314
+				>
315
+			</File>
316
+			<File
317
+				RelativePath=".\options.c"
318
+				>
319
+			</File>
320
+			<File
321
+				RelativePath=".\otime.c"
322
+				>
323
+			</File>
324
+			<File
325
+				RelativePath=".\packet_id.c"
326
+				>
327
+			</File>
328
+			<File
329
+				RelativePath=".\perf.c"
330
+				>
331
+			</File>
332
+			<File
333
+				RelativePath=".\pf.c"
334
+				>
335
+			</File>
336
+			<File
337
+				RelativePath=".\ping.c"
338
+				>
339
+			</File>
340
+			<File
341
+				RelativePath=".\pkcs11.c"
342
+				>
343
+			</File>
344
+			<File
345
+				RelativePath=".\pkcs11_openssl.c"
346
+				>
347
+			</File>
348
+			<File
349
+				RelativePath=".\plugin.c"
350
+				>
351
+			</File>
352
+			<File
353
+				RelativePath=".\pool.c"
354
+				>
355
+			</File>
356
+			<File
357
+				RelativePath=".\proto.c"
358
+				>
359
+			</File>
360
+			<File
361
+				RelativePath=".\proxy.c"
362
+				>
363
+			</File>
364
+			<File
365
+				RelativePath=".\ps.c"
366
+				>
367
+			</File>
368
+			<File
369
+				RelativePath=".\push.c"
370
+				>
371
+			</File>
372
+			<File
373
+				RelativePath=".\reliable.c"
374
+				>
375
+			</File>
376
+			<File
377
+				RelativePath=".\route.c"
378
+				>
379
+			</File>
380
+			<File
381
+				RelativePath=".\schedule.c"
382
+				>
383
+			</File>
384
+			<File
385
+				RelativePath=".\session_id.c"
386
+				>
387
+			</File>
388
+			<File
389
+				RelativePath=".\shaper.c"
390
+				>
391
+			</File>
392
+			<File
393
+				RelativePath=".\sig.c"
394
+				>
395
+			</File>
396
+			<File
397
+				RelativePath=".\socket.c"
398
+				>
399
+			</File>
400
+			<File
401
+				RelativePath=".\socks.c"
402
+				>
403
+			</File>
404
+			<File
405
+				RelativePath=".\ssl.c"
406
+				>
407
+			</File>
408
+			<File
409
+				RelativePath=".\ssl_openssl.c"
410
+				>
411
+			</File>
412
+			<File
413
+				RelativePath=".\ssl_verify.c"
414
+				>
415
+			</File>
416
+			<File
417
+				RelativePath=".\ssl_verify_openssl.c"
418
+				>
419
+			</File>
420
+			<File
421
+				RelativePath=".\status.c"
422
+				>
423
+			</File>
424
+			<File
425
+				RelativePath=".\tun.c"
426
+				>
427
+			</File>
428
+			<File
429
+				RelativePath=".\win32.c"
430
+				>
431
+			</File>
432
+		</Filter>
433
+		<Filter
434
+			Name="Header Files"
435
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
436
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
437
+			>
438
+			<File
439
+				RelativePath=".\base64.h"
440
+				>
441
+			</File>
442
+			<File
443
+				RelativePath=".\basic.h"
444
+				>
445
+			</File>
446
+			<File
447
+				RelativePath=".\buffer.h"
448
+				>
449
+			</File>
450
+			<File
451
+				RelativePath=".\circ_list.h"
452
+				>
453
+			</File>
454
+			<File
455
+				RelativePath=".\clinat.h"
456
+				>
457
+			</File>
458
+			<File
459
+				RelativePath=".\common.h"
460
+				>
461
+			</File>
462
+			<File
463
+				RelativePath=".\compat.h"
464
+				>
465
+			</File>
466
+			<File
467
+				RelativePath=".\crypto.h"
468
+				>
469
+			</File>
470
+			<File
471
+				RelativePath=".\crypto_backend.h"
472
+				>
473
+			</File>
474
+			<File
475
+				RelativePath=".\crypto_openssl.h"
476
+				>
477
+			</File>
478
+			<File
479
+				RelativePath=".\cryptoapi.h"
480
+				>
481
+			</File>
482
+			<File
483
+				RelativePath=".\dhcp.h"
484
+				>
485
+			</File>
486
+			<File
487
+				RelativePath=".\errlevel.h"
488
+				>
489
+			</File>
490
+			<File
491
+				RelativePath=".\error.h"
492
+				>
493
+			</File>
494
+			<File
495
+				RelativePath=".\event.h"
496
+				>
497
+			</File>
498
+			<File
499
+				RelativePath=".\fdmisc.h"
500
+				>
501
+			</File>
502
+			<File
503
+				RelativePath=".\forward-inline.h"
504
+				>
505
+			</File>
506
+			<File
507
+				RelativePath=".\forward.h"
508
+				>
509
+			</File>
510
+			<File
511
+				RelativePath=".\fragment.h"
512
+				>
513
+			</File>
514
+			<File
515
+				RelativePath=".\gremlin.h"
516
+				>
517
+			</File>
518
+			<File
519
+				RelativePath=".\helper.h"
520
+				>
521
+			</File>
522
+			<File
523
+				RelativePath=".\httpdigest.h"
524
+				>
525
+			</File>
526
+			<File
527
+				RelativePath=".\init.h"
528
+				>
529
+			</File>
530
+			<File
531
+				RelativePath=".\integer.h"
532
+				>
533
+			</File>
534
+			<File
535
+				RelativePath=".\interval.h"
536
+				>
537
+			</File>
538
+			<File
539
+				RelativePath=".\list.h"
540
+				>
541
+			</File>
542
+			<File
543
+				RelativePath=".\lladdr.h"
544
+				>
545
+			</File>
546
+			<File
547
+				RelativePath=".\lzo.h"
548
+				>
549
+			</File>
550
+			<File
551
+				RelativePath=".\manage.h"
552
+				>
553
+			</File>
554
+			<File
555
+				RelativePath=".\mbuf.h"
556
+				>
557
+			</File>
558
+			<File
559
+				RelativePath=".\memdbg.h"
560
+				>
561
+			</File>
562
+			<File
563
+				RelativePath=".\misc.h"
564
+				>
565
+			</File>
566
+			<File
567
+				RelativePath=".\mroute.h"
568
+				>
569
+			</File>
570
+			<File
571
+				RelativePath=".\mss.h"
572
+				>
573
+			</File>
574
+			<File
575
+				RelativePath=".\mstats.h"
576
+				>
577
+			</File>
578
+			<File
579
+				RelativePath=".\mtcp.h"
580
+				>
581
+			</File>
582
+			<File
583
+				RelativePath=".\mtu.h"
584
+				>
585
+			</File>
586
+			<File
587
+				RelativePath=".\mudp.h"
588
+				>
589
+			</File>
590
+			<File
591
+				RelativePath=".\multi.h"
592
+				>
593
+			</File>
594
+			<File
595
+				RelativePath=".\ntlm.h"
596
+				>
597
+			</File>
598
+			<File
599
+				RelativePath=".\occ-inline.h"
600
+				>
601
+			</File>
602
+			<File
603
+				RelativePath=".\occ.h"
604
+				>
605
+			</File>
606
+			<File
607
+				RelativePath=".\openvpn.h"
608
+				>
609
+			</File>
610
+			<File
611
+				RelativePath=".\options.h"
612
+				>
613
+			</File>
614
+			<File
615
+				RelativePath=".\otime.h"
616
+				>
617
+			</File>
618
+			<File
619
+				RelativePath=".\packet_id.h"
620
+				>
621
+			</File>
622
+			<File
623
+				RelativePath=".\perf.h"
624
+				>
625
+			</File>
626
+			<File
627
+				RelativePath=".\pf-inline.h"
628
+				>
629
+			</File>
630
+			<File
631
+				RelativePath=".\pf.h"
632
+				>
633
+			</File>
634
+			<File
635
+				RelativePath=".\ping-inline.h"
636
+				>
637
+			</File>
638
+			<File
639
+				RelativePath=".\ping.h"
640
+				>
641
+			</File>
642
+			<File
643
+				RelativePath=".\pkcs11.h"
644
+				>
645
+			</File>
646
+			<File
647
+				RelativePath=".\pkcs11_backend.h"
648
+				>
649
+			</File>
650
+			<File
651
+				RelativePath=".\plugin.h"
652
+				>
653
+			</File>
654
+			<File
655
+				RelativePath=".\pool.h"
656
+				>
657
+			</File>
658
+			<File
659
+				RelativePath=".\proto.h"
660
+				>
661
+			</File>
662
+			<File
663
+				RelativePath=".\proxy.h"
664
+				>
665
+			</File>
666
+			<File
667
+				RelativePath=".\ps.h"
668
+				>
669
+			</File>
670
+			<File
671
+				RelativePath=".\push.h"
672
+				>
673
+			</File>
674
+			<File
675
+				RelativePath=".\pushlist.h"
676
+				>
677
+			</File>
678
+			<File
679
+				RelativePath=".\reliable.h"
680
+				>
681
+			</File>
682
+			<File
683
+				RelativePath=".\route.h"
684
+				>
685
+			</File>
686
+			<File
687
+				RelativePath=".\schedule.h"
688
+				>
689
+			</File>
690
+			<File
691
+				RelativePath=".\session_id.h"
692
+				>
693
+			</File>
694
+			<File
695
+				RelativePath=".\shaper.h"
696
+				>
697
+			</File>
698
+			<File
699
+				RelativePath=".\sig.h"
700
+				>
701
+			</File>
702
+			<File
703
+				RelativePath=".\socket.h"
704
+				>
705
+			</File>
706
+			<File
707
+				RelativePath=".\socks.h"
708
+				>
709
+			</File>
710
+			<File
711
+				RelativePath=".\ssl.h"
712
+				>
713
+			</File>
714
+			<File
715
+				RelativePath=".\ssl_backend.h"
716
+				>
717
+			</File>
718
+			<File
719
+				RelativePath=".\ssl_common.h"
720
+				>
721
+			</File>
722
+			<File
723
+				RelativePath=".\ssl_openssl.h"
724
+				>
725
+			</File>
726
+			<File
727
+				RelativePath=".\ssl_verify.h"
728
+				>
729
+			</File>
730
+			<File
731
+				RelativePath=".\ssl_verify_backend.h"
732
+				>
733
+			</File>
734
+			<File
735
+				RelativePath=".\ssl_verify_openssl.h"
736
+				>
737
+			</File>
738
+			<File
739
+				RelativePath=".\status.h"
740
+				>
741
+			</File>
742
+			<File
743
+				RelativePath=".\syshead.h"
744
+				>
745
+			</File>
746
+			<File
747
+				RelativePath=".\tun.h"
748
+				>
749
+			</File>
750
+			<File
751
+				RelativePath=".\win32.h"
752
+				>
753
+			</File>
754
+		</Filter>
755
+		<Filter
756
+			Name="Resource Files"
757
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
758
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
759
+			>
760
+			<File
761
+				RelativePath=".\openvpn_win32_resources.rc"
762
+				>
763
+			</File>
764
+		</Filter>
765
+	</Files>
766
+	<Globals>
767
+	</Globals>
768
+</VisualStudioProject>
... ...
@@ -1,7 +1,7 @@
1 1
 #ifdef HAVE_CONFIG_H
2 2
 #include <config.h>
3 3
 #else
4
-#include <config-msc-version.h>
4
+#include <config-msvc-version.h>
5 5
 #endif
6 6
 #include <winresrc.h>
7 7
 
... ...
@@ -28,11 +28,13 @@
28 28
 /*
29 29
  * Only include if not during configure
30 30
  */
31
-#ifndef PACKAGE_NAME
31
+#ifdef HAVE_CONFIG_H
32 32
 #include "config.h"
33
-#include "compat.h"
33
+#elif defined(_MSC_VER)
34
+#include "config-msvc.h"
34 35
 #endif
35 36
 
37
+#include "compat.h"
36 38
 
37 39
 /* branch prediction hints */
38 40
 #if defined(__GNUC__)
... ...
@@ -102,6 +104,14 @@
102 102
 #include <fcntl.h>
103 103
 #endif
104 104
 
105
+#ifdef HAVE_DIRECT_H
106
+#include <direct.h>
107
+#endif
108
+
109
+#ifdef HAVE_IO_H
110
+#include <io.h>
111
+#endif
112
+
105 113
 #ifdef HAVE_SYS_FILE_H
106 114
 #include <sys/file.h>
107 115
 #endif
... ...
@@ -3624,7 +3624,7 @@ get_adapter_index_method_1 (const char *guid)
3624 3624
   ULONG index = ~0;
3625 3625
   DWORD status;
3626 3626
   wchar_t wbuf[256];
3627
-  snwprintf (wbuf, SIZE (wbuf), L"\\DEVICE\\TCPIP_%S", guid);
3627
+  _snwprintf (wbuf, SIZE (wbuf), L"\\DEVICE\\TCPIP_%S", guid);
3628 3628
   wbuf [SIZE(wbuf) - 1] = 0;
3629 3629
   if ((status = GetAdapterIndex (wbuf, &index)) != NO_ERROR)
3630 3630
     index = ~0;
... ...
@@ -611,7 +611,7 @@ window_title_generate (const char *title)
611 611
   struct buffer out = alloc_buf_gc (256, &gc);
612 612
   if (!title)
613 613
     title = "";
614
-  buf_printf (&out, "[%s] " PACKAGE_NAME " " VERSION " F4:EXIT F1:USR1 F2:USR2 F3:HUP", title);
614
+  buf_printf (&out, "[%s] " PACKAGE_NAME " " PACKAGE_VERSION " F4:EXIT F1:USR1 F2:USR2 F3:HUP", title);
615 615
   SetConsoleTitle (BSTR (&out));
616 616
   gc_free (&gc);
617 617
 }
... ...
@@ -13,6 +13,9 @@ include $(top_srcdir)/build/ltrc.inc
13 13
 
14 14
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
15 15
 
16
+EXTRA_DIST = \
17
+	openvpnserv.vcproj
18
+
16 19
 if WIN32
17 20
 sbin_PROGRAMS = openvpnserv
18 21
 endif
... ...
@@ -33,7 +33,11 @@
33 33
  * This code is designed to be built with the mingw compiler.
34 34
  */
35 35
 
36
+#ifdef HAVE_CONFIG_H
36 37
 #include "config.h"
38
+#elif defined(_MSC_VER)
39
+#include "config-msvc.h"
40
+#endif
37 41
 #include <windows.h>
38 42
 #include <stdlib.h>
39 43
 #include <stdio.h>
... ...
@@ -196,7 +200,7 @@ match (const WIN32_FIND_DATA *find, const char *ext)
196 196
   if (i < 1)
197 197
     return false;
198 198
 
199
-  return find->cFileName[i] == '.' && !strcasecmp (find->cFileName + i + 1, ext);
199
+  return find->cFileName[i] == '.' && !_stricmp (find->cFileName + i + 1, ext);
200 200
 }
201 201
 
202 202
 /*
... ...
@@ -331,15 +335,15 @@ VOID ServiceStart (DWORD dwArgc, LPTSTR *lpszArgv)
331 331
 
332 332
   /* set process priority */
333 333
   priority = NORMAL_PRIORITY_CLASS;
334
-  if (!strcasecmp (priority_string, "IDLE_PRIORITY_CLASS"))
334
+  if (!_stricmp (priority_string, "IDLE_PRIORITY_CLASS"))
335 335
     priority = IDLE_PRIORITY_CLASS;
336
-  else if (!strcasecmp (priority_string, "BELOW_NORMAL_PRIORITY_CLASS"))
336
+  else if (!_stricmp (priority_string, "BELOW_NORMAL_PRIORITY_CLASS"))
337 337
     priority = BELOW_NORMAL_PRIORITY_CLASS;
338
-  else if (!strcasecmp (priority_string, "NORMAL_PRIORITY_CLASS"))
338
+  else if (!_stricmp (priority_string, "NORMAL_PRIORITY_CLASS"))
339 339
     priority = NORMAL_PRIORITY_CLASS;
340
-  else if (!strcasecmp (priority_string, "ABOVE_NORMAL_PRIORITY_CLASS"))
340
+  else if (!_stricmp (priority_string, "ABOVE_NORMAL_PRIORITY_CLASS"))
341 341
     priority = ABOVE_NORMAL_PRIORITY_CLASS;
342
-  else if (!strcasecmp (priority_string, "HIGH_PRIORITY_CLASS"))
342
+  else if (!_stricmp (priority_string, "HIGH_PRIORITY_CLASS"))
343 343
     priority = HIGH_PRIORITY_CLASS;
344 344
   else
345 345
     {
346 346
new file mode 100644
... ...
@@ -0,0 +1,209 @@
0
+<?xml version="1.0" encoding="Windows-1252"?>
1
+<VisualStudioProject
2
+	ProjectType="Visual C++"
3
+	Version="9.00"
4
+	Name="openvpnserv"
5
+	ProjectGUID="{9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}"
6
+	RootNamespace="openvpnserv"
7
+	Keyword="Win32Proj"
8
+	TargetFrameworkVersion="196613"
9
+	>
10
+	<Platforms>
11
+		<Platform
12
+			Name="Win32"
13
+		/>
14
+	</Platforms>
15
+	<ToolFiles>
16
+	</ToolFiles>
17
+	<Configurations>
18
+		<Configuration
19
+			Name="Debug|Win32"
20
+			OutputDirectory="$(SolutionDir)$(PlatformName)-Output\$(ConfigurationName)"
21
+			IntermediateDirectory="$(ConfigurationName)"
22
+			ConfigurationType="1"
23
+			CharacterSet="2"
24
+			>
25
+			<Tool
26
+				Name="VCPreBuildEventTool"
27
+			/>
28
+			<Tool
29
+				Name="VCCustomBuildTool"
30
+			/>
31
+			<Tool
32
+				Name="VCXMLDataGeneratorTool"
33
+			/>
34
+			<Tool
35
+				Name="VCWebServiceProxyGeneratorTool"
36
+			/>
37
+			<Tool
38
+				Name="VCMIDLTool"
39
+			/>
40
+			<Tool
41
+				Name="VCCLCompilerTool"
42
+				Optimization="0"
43
+				AdditionalIncludeDirectories="$(SOURCEBASE)"
44
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;$(CPPFLAGS)"
45
+				MinimalRebuild="true"
46
+				BasicRuntimeChecks="3"
47
+				RuntimeLibrary="3"
48
+				UsePrecompiledHeader="0"
49
+				WarningLevel="3"
50
+				DebugInformationFormat="4"
51
+			/>
52
+			<Tool
53
+				Name="VCManagedResourceCompilerTool"
54
+			/>
55
+			<Tool
56
+				Name="VCResourceCompilerTool"
57
+				AdditionalIncludeDirectories="$(SOURCEBASE)"
58
+			/>
59
+			<Tool
60
+				Name="VCPreLinkEventTool"
61
+			/>
62
+			<Tool
63
+				Name="VCLinkerTool"
64
+				LinkIncremental="2"
65
+				GenerateDebugInformation="true"
66
+				SubSystem="1"
67
+				TargetMachine="1"
68
+			/>
69
+			<Tool
70
+				Name="VCALinkTool"
71
+			/>
72
+			<Tool
73
+				Name="VCManifestTool"
74
+			/>
75
+			<Tool
76
+				Name="VCXDCMakeTool"
77
+			/>
78
+			<Tool
79
+				Name="VCBscMakeTool"
80
+			/>
81
+			<Tool
82
+				Name="VCFxCopTool"
83
+			/>
84
+			<Tool
85
+				Name="VCAppVerifierTool"
86
+			/>
87
+			<Tool
88
+				Name="VCPostBuildEventTool"
89
+			/>
90
+		</Configuration>
91
+		<Configuration
92
+			Name="Release|Win32"
93
+			OutputDirectory="$(SolutionDir)$(PlatformName)-Output\$(ConfigurationName)"
94
+			IntermediateDirectory="$(ConfigurationName)"
95
+			ConfigurationType="1"
96
+			CharacterSet="2"
97
+			WholeProgramOptimization="1"
98
+			>
99
+			<Tool
100
+				Name="VCPreBuildEventTool"
101
+			/>
102
+			<Tool
103
+				Name="VCCustomBuildTool"
104
+			/>
105
+			<Tool
106
+				Name="VCXMLDataGeneratorTool"
107
+			/>
108
+			<Tool
109
+				Name="VCWebServiceProxyGeneratorTool"
110
+			/>
111
+			<Tool
112
+				Name="VCMIDLTool"
113
+			/>
114
+			<Tool
115
+				Name="VCCLCompilerTool"
116
+				Optimization="2"
117
+				EnableIntrinsicFunctions="true"
118
+				AdditionalIncludeDirectories="$(SOURCEBASE)"
119
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;$(CPPFLAGS)"
120
+				RuntimeLibrary="2"
121
+				EnableFunctionLevelLinking="true"
122
+				UsePrecompiledHeader="0"
123
+				WarningLevel="3"
124
+				DebugInformationFormat="3"
125
+			/>
126
+			<Tool
127
+				Name="VCManagedResourceCompilerTool"
128
+			/>
129
+			<Tool
130
+				Name="VCResourceCompilerTool"
131
+				AdditionalIncludeDirectories="$(SOURCEBASE)"
132
+			/>
133
+			<Tool
134
+				Name="VCPreLinkEventTool"
135
+			/>
136
+			<Tool
137
+				Name="VCLinkerTool"
138
+				LinkIncremental="1"
139
+				GenerateDebugInformation="true"
140
+				SubSystem="1"
141
+				OptimizeReferences="2"
142
+				EnableCOMDATFolding="2"
143
+				TargetMachine="1"
144
+			/>
145
+			<Tool
146
+				Name="VCALinkTool"
147
+			/>
148
+			<Tool
149
+				Name="VCManifestTool"
150
+			/>
151
+			<Tool
152
+				Name="VCXDCMakeTool"
153
+			/>
154
+			<Tool
155
+				Name="VCBscMakeTool"
156
+			/>
157
+			<Tool
158
+				Name="VCFxCopTool"
159
+			/>
160
+			<Tool
161
+				Name="VCAppVerifierTool"
162
+			/>
163
+			<Tool
164
+				Name="VCPostBuildEventTool"
165
+			/>
166
+		</Configuration>
167
+	</Configurations>
168
+	<References>
169
+	</References>
170
+	<Files>
171
+		<Filter
172
+			Name="Source Files"
173
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
174
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
175
+			>
176
+			<File
177
+				RelativePath=".\openvpnserv.c"
178
+				>
179
+			</File>
180
+			<File
181
+				RelativePath=".\service.c"
182
+				>
183
+			</File>
184
+		</Filter>
185
+		<Filter
186
+			Name="Header Files"
187
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
188
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
189
+			>
190
+			<File
191
+				RelativePath=".\service.h"
192
+				>
193
+			</File>
194
+		</Filter>
195
+		<Filter
196
+			Name="Resource Files"
197
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
198
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
199
+			>
200
+			<File
201
+				RelativePath=".\openvpnserv_resources.rc"
202
+				>
203
+			</File>
204
+		</Filter>
205
+	</Files>
206
+	<Globals>
207
+	</Globals>
208
+</VisualStudioProject>
... ...
@@ -1,7 +1,7 @@
1 1
 #ifdef HAVE_CONFIG_H
2 2
 #include <config.h>
3 3
 #else
4
-#include <config-msc-version.h>
4
+#include <config-msvc-version.h>
5 5
 #endif
6 6
 #include <winresrc.h>
7 7
 
... ...
@@ -23,6 +23,11 @@ FUNCTIONS:
23 23
 
24 24
 ---------------------------------------------------------------------------*/
25 25
 
26
+#ifdef HAVE_CONFIG_H
27
+#include "config.h"
28
+#elif defined(_MSC_VER)
29
+#include "config-msvc.h"
30
+#endif
26 31
 #include <windows.h>
27 32
 #include <stdio.h>
28 33
 #include <stdlib.h>
... ...
@@ -57,8 +57,6 @@ Copyright (C) 1993 - 2000.  Microsoft Corporation.  All rights reserved.
57 57
 extern "C" {
58 58
 #endif
59 59
 
60
-#include "config.h"
61
-
62 60
 //////////////////////////////////////////////////////////////////////////////
63 61
 //// todo: change to desired strings
64 62
 ////