diff options
author | Alon Bar-Lev | 2012-02-29 22:12:12 +0200 |
---|---|---|
committer | David Sommerseth | 2012-03-22 22:53:39 +0100 |
commit | 4b1a82db0975088dbfe69c2a97f0a96ef972b2a4 (patch) | |
tree | fc61e38d86d9fe0898e8c427e7f3f2cf4d464529 /src | |
parent | 709f7a1f73baade82f07146273d31d53007f394d (diff) | |
download | openvpn-4b1a82db0975088dbfe69c2a97f0a96ef972b2a4.zip openvpn-4b1a82db0975088dbfe69c2a97f0a96ef972b2a4.tar.gz |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/openvpn/Makefile.am | 3 | ||||
-rw-r--r-- | src/openvpn/compat.h | 2 | ||||
-rw-r--r-- | src/openvpn/crypto_backend.h | 2 | ||||
-rw-r--r-- | src/openvpn/openvpn.vcproj | 769 | ||||
-rw-r--r-- | src/openvpn/openvpn_win32_resources.rc | 2 | ||||
-rw-r--r-- | src/openvpn/syshead.h | 14 | ||||
-rw-r--r-- | src/openvpn/tun.c | 2 | ||||
-rw-r--r-- | src/openvpn/win32.c | 2 | ||||
-rw-r--r-- | src/openvpnserv/Makefile.am | 3 | ||||
-rwxr-xr-x | src/openvpnserv/openvpnserv.c | 16 | ||||
-rw-r--r-- | src/openvpnserv/openvpnserv.vcproj | 209 | ||||
-rw-r--r-- | src/openvpnserv/openvpnserv_resources.rc | 2 | ||||
-rw-r--r-- | src/openvpnserv/service.c | 5 | ||||
-rw-r--r-- | src/openvpnserv/service.h | 2 |
14 files changed, 1015 insertions, 18 deletions
diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am index e9b3b07..3d8c0a9 100644 --- a/src/openvpn/Makefile.am +++ b/src/openvpn/Makefile.am @@ -14,6 +14,9 @@ include $(top_srcdir)/build/ltrc.inc MAINTAINERCLEANFILES = \ $(srcdir)/Makefile.in +EXTRA_DIST = \ + openvpn.vcproj + INCLUDES = -I$(top_srcdir)/include AM_CFLAGS = \ diff --git a/src/openvpn/compat.h b/src/openvpn/compat.h index b380f0b..7af9fe2 100644 --- a/src/openvpn/compat.h +++ b/src/openvpn/compat.h @@ -25,8 +25,6 @@ #ifndef COMPAT_H #define COMPAT_H -#include "config.h" - #if defined(HAVE_BASENAME) || defined(HAVE_DIRNAME) #include <libgen.h> #endif diff --git a/src/openvpn/crypto_backend.h b/src/openvpn/crypto_backend.h index 57f2ac4..1eac611 100644 --- a/src/openvpn/crypto_backend.h +++ b/src/openvpn/crypto_backend.h @@ -30,8 +30,6 @@ #ifndef CRYPTO_BACKEND_H_ #define CRYPTO_BACKEND_H_ -#include "config.h" - #ifdef ENABLE_CRYPTO_OPENSSL #include "crypto_openssl.h" #endif diff --git a/src/openvpn/openvpn.vcproj b/src/openvpn/openvpn.vcproj new file mode 100644 index 0000000..8a3f4b0 --- /dev/null +++ b/src/openvpn/openvpn.vcproj @@ -0,0 +1,769 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="openvpn" + ProjectGUID="{29DF226E-4D4E-440F-ADAF-5829CFD4CA94}" + RootNamespace="openvpn" + Keyword="Win32Proj" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(PlatformName)-Output\$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="$(SOURCEBASE);$(SOURCEBASE)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;$(CPPFLAGS)" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + AdditionalIncludeDirectories="$(SOURCEBASE)" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + 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" + LinkIncremental="2" + AdditionalLibraryDirectories="$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib" + GenerateDebugInformation="true" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(PlatformName)-Output\$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories="$(SOURCEBASE);$(SOURCEBASE)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;$(CPPFLAGS)" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + AdditionalIncludeDirectories="$(SOURCEBASE)" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + 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" + LinkIncremental="1" + AdditionalLibraryDirectories="$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\base64.c" + > + </File> + <File + RelativePath=".\buffer.c" + > + </File> + <File + RelativePath=".\clinat.c" + > + </File> + <File + RelativePath=".\compat.c" + > + </File> + <File + RelativePath=".\crypto.c" + > + </File> + <File + RelativePath=".\crypto_openssl.c" + > + </File> + <File + RelativePath=".\cryptoapi.c" + > + </File> + <File + RelativePath=".\dhcp.c" + > + </File> + <File + RelativePath=".\error.c" + > + </File> + <File + RelativePath=".\event.c" + > + </File> + <File + RelativePath=".\fdmisc.c" + > + </File> + <File + RelativePath=".\forward.c" + > + </File> + <File + RelativePath=".\fragment.c" + > + </File> + <File + RelativePath=".\gremlin.c" + > + </File> + <File + RelativePath=".\helper.c" + > + </File> + <File + RelativePath=".\httpdigest.c" + > + </File> + <File + RelativePath=".\init.c" + > + </File> + <File + RelativePath=".\interval.c" + > + </File> + <File + RelativePath=".\list.c" + > + </File> + <File + RelativePath=".\lladdr.c" + > + </File> + <File + RelativePath=".\lzo.c" + > + </File> + <File + RelativePath=".\manage.c" + > + </File> + <File + RelativePath=".\mbuf.c" + > + </File> + <File + RelativePath=".\misc.c" + > + </File> + <File + RelativePath=".\mroute.c" + > + </File> + <File + RelativePath=".\mss.c" + > + </File> + <File + RelativePath=".\mstats.c" + > + </File> + <File + RelativePath=".\mtcp.c" + > + </File> + <File + RelativePath=".\mtu.c" + > + </File> + <File + RelativePath=".\mudp.c" + > + </File> + <File + RelativePath=".\multi.c" + > + </File> + <File + RelativePath=".\ntlm.c" + > + </File> + <File + RelativePath=".\occ.c" + > + </File> + <File + RelativePath=".\openvpn.c" + > + </File> + <File + RelativePath=".\options.c" + > + </File> + <File + RelativePath=".\otime.c" + > + </File> + <File + RelativePath=".\packet_id.c" + > + </File> + <File + RelativePath=".\perf.c" + > + </File> + <File + RelativePath=".\pf.c" + > + </File> + <File + RelativePath=".\ping.c" + > + </File> + <File + RelativePath=".\pkcs11.c" + > + </File> + <File + RelativePath=".\pkcs11_openssl.c" + > + </File> + <File + RelativePath=".\plugin.c" + > + </File> + <File + RelativePath=".\pool.c" + > + </File> + <File + RelativePath=".\proto.c" + > + </File> + <File + RelativePath=".\proxy.c" + > + </File> + <File + RelativePath=".\ps.c" + > + </File> + <File + RelativePath=".\push.c" + > + </File> + <File + RelativePath=".\reliable.c" + > + </File> + <File + RelativePath=".\route.c" + > + </File> + <File + RelativePath=".\schedule.c" + > + </File> + <File + RelativePath=".\session_id.c" + > + </File> + <File + RelativePath=".\shaper.c" + > + </File> + <File + RelativePath=".\sig.c" + > + </File> + <File + RelativePath=".\socket.c" + > + </File> + <File + RelativePath=".\socks.c" + > + </File> + <File + RelativePath=".\ssl.c" + > + </File> + <File + RelativePath=".\ssl_openssl.c" + > + </File> + <File + RelativePath=".\ssl_verify.c" + > + </File> + <File + RelativePath=".\ssl_verify_openssl.c" + > + </File> + <File + RelativePath=".\status.c" + > + </File> + <File + RelativePath=".\tun.c" + > + </File> + <File + RelativePath=".\win32.c" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\base64.h" + > + </File> + <File + RelativePath=".\basic.h" + > + </File> + <File + RelativePath=".\buffer.h" + > + </File> + <File + RelativePath=".\circ_list.h" + > + </File> + <File + RelativePath=".\clinat.h" + > + </File> + <File + RelativePath=".\common.h" + > + </File> + <File + RelativePath=".\compat.h" + > + </File> + <File + RelativePath=".\crypto.h" + > + </File> + <File + RelativePath=".\crypto_backend.h" + > + </File> + <File + RelativePath=".\crypto_openssl.h" + > + </File> + <File + RelativePath=".\cryptoapi.h" + > + </File> + <File + RelativePath=".\dhcp.h" + > + </File> + <File + RelativePath=".\errlevel.h" + > + </File> + <File + RelativePath=".\error.h" + > + </File> + <File + RelativePath=".\event.h" + > + </File> + <File + RelativePath=".\fdmisc.h" + > + </File> + <File + RelativePath=".\forward-inline.h" + > + </File> + <File + RelativePath=".\forward.h" + > + </File> + <File + RelativePath=".\fragment.h" + > + </File> + <File + RelativePath=".\gremlin.h" + > + </File> + <File + RelativePath=".\helper.h" + > + </File> + <File + RelativePath=".\httpdigest.h" + > + </File> + <File + RelativePath=".\init.h" + > + </File> + <File + RelativePath=".\integer.h" + > + </File> + <File + RelativePath=".\interval.h" + > + </File> + <File + RelativePath=".\list.h" + > + </File> + <File + RelativePath=".\lladdr.h" + > + </File> + <File + RelativePath=".\lzo.h" + > + </File> + <File + RelativePath=".\manage.h" + > + </File> + <File + RelativePath=".\mbuf.h" + > + </File> + <File + RelativePath=".\memdbg.h" + > + </File> + <File + RelativePath=".\misc.h" + > + </File> + <File + RelativePath=".\mroute.h" + > + </File> + <File + RelativePath=".\mss.h" + > + </File> + <File + RelativePath=".\mstats.h" + > + </File> + <File + RelativePath=".\mtcp.h" + > + </File> + <File + RelativePath=".\mtu.h" + > + </File> + <File + RelativePath=".\mudp.h" + > + </File> + <File + RelativePath=".\multi.h" + > + </File> + <File + RelativePath=".\ntlm.h" + > + </File> + <File + RelativePath=".\occ-inline.h" + > + </File> + <File + RelativePath=".\occ.h" + > + </File> + <File + RelativePath=".\openvpn.h" + > + </File> + <File + RelativePath=".\options.h" + > + </File> + <File + RelativePath=".\otime.h" + > + </File> + <File + RelativePath=".\packet_id.h" + > + </File> + <File + RelativePath=".\perf.h" + > + </File> + <File + RelativePath=".\pf-inline.h" + > + </File> + <File + RelativePath=".\pf.h" + > + </File> + <File + RelativePath=".\ping-inline.h" + > + </File> + <File + RelativePath=".\ping.h" + > + </File> + <File + RelativePath=".\pkcs11.h" + > + </File> + <File + RelativePath=".\pkcs11_backend.h" + > + </File> + <File + RelativePath=".\plugin.h" + > + </File> + <File + RelativePath=".\pool.h" + > + </File> + <File + RelativePath=".\proto.h" + > + </File> + <File + RelativePath=".\proxy.h" + > + </File> + <File + RelativePath=".\ps.h" + > + </File> + <File + RelativePath=".\push.h" + > + </File> + <File + RelativePath=".\pushlist.h" + > + </File> + <File + RelativePath=".\reliable.h" + > + </File> + <File + RelativePath=".\route.h" + > + </File> + <File + RelativePath=".\schedule.h" + > + </File> + <File + RelativePath=".\session_id.h" + > + </File> + <File + RelativePath=".\shaper.h" + > + </File> + <File + RelativePath=".\sig.h" + > + </File> + <File + RelativePath=".\socket.h" + > + </File> + <File + RelativePath=".\socks.h" + > + </File> + <File + RelativePath=".\ssl.h" + > + </File> + <File + RelativePath=".\ssl_backend.h" + > + </File> + <File + RelativePath=".\ssl_common.h" + > + </File> + <File + RelativePath=".\ssl_openssl.h" + > + </File> + <File + RelativePath=".\ssl_verify.h" + > + </File> + <File + RelativePath=".\ssl_verify_backend.h" + > + </File> + <File + RelativePath=".\ssl_verify_openssl.h" + > + </File> + <File + RelativePath=".\status.h" + > + </File> + <File + RelativePath=".\syshead.h" + > + </File> + <File + RelativePath=".\tun.h" + > + </File> + <File + RelativePath=".\win32.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File + RelativePath=".\openvpn_win32_resources.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/openvpn/openvpn_win32_resources.rc b/src/openvpn/openvpn_win32_resources.rc index 5538073..6d77163 100644 --- a/src/openvpn/openvpn_win32_resources.rc +++ b/src/openvpn/openvpn_win32_resources.rc @@ -1,7 +1,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> #else -#include <config-msc-version.h> +#include <config-msvc-version.h> #endif #include <winresrc.h> diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index b82f9e4..bca842c 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -28,11 +28,13 @@ /* * Only include if not during configure */ -#ifndef PACKAGE_NAME +#ifdef HAVE_CONFIG_H #include "config.h" -#include "compat.h" +#elif defined(_MSC_VER) +#include "config-msvc.h" #endif +#include "compat.h" /* branch prediction hints */ #if defined(__GNUC__) @@ -102,6 +104,14 @@ #include <fcntl.h> #endif +#ifdef HAVE_DIRECT_H +#include <direct.h> +#endif + +#ifdef HAVE_IO_H +#include <io.h> +#endif + #ifdef HAVE_SYS_FILE_H #include <sys/file.h> #endif diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 7b74ebd..9df7126 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -3624,7 +3624,7 @@ get_adapter_index_method_1 (const char *guid) ULONG index = ~0; DWORD status; wchar_t wbuf[256]; - snwprintf (wbuf, SIZE (wbuf), L"\\DEVICE\\TCPIP_%S", guid); + _snwprintf (wbuf, SIZE (wbuf), L"\\DEVICE\\TCPIP_%S", guid); wbuf [SIZE(wbuf) - 1] = 0; if ((status = GetAdapterIndex (wbuf, &index)) != NO_ERROR) index = ~0; diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c index acf5ebc..7639bad 100644 --- a/src/openvpn/win32.c +++ b/src/openvpn/win32.c @@ -611,7 +611,7 @@ window_title_generate (const char *title) struct buffer out = alloc_buf_gc (256, &gc); if (!title) title = ""; - buf_printf (&out, "[%s] " PACKAGE_NAME " " VERSION " F4:EXIT F1:USR1 F2:USR2 F3:HUP", title); + buf_printf (&out, "[%s] " PACKAGE_NAME " " PACKAGE_VERSION " F4:EXIT F1:USR1 F2:USR2 F3:HUP", title); SetConsoleTitle (BSTR (&out)); gc_free (&gc); } diff --git a/src/openvpnserv/Makefile.am b/src/openvpnserv/Makefile.am index 58005c0..8584b06 100644 --- a/src/openvpnserv/Makefile.am +++ b/src/openvpnserv/Makefile.am @@ -13,6 +13,9 @@ include $(top_srcdir)/build/ltrc.inc MAINTAINERCLEANFILES = $(srcdir)/Makefile.in +EXTRA_DIST = \ + openvpnserv.vcproj + if WIN32 sbin_PROGRAMS = openvpnserv endif diff --git a/src/openvpnserv/openvpnserv.c b/src/openvpnserv/openvpnserv.c index 0993064..a9a9441 100755 --- a/src/openvpnserv/openvpnserv.c +++ b/src/openvpnserv/openvpnserv.c @@ -33,7 +33,11 @@ * This code is designed to be built with the mingw compiler. */ +#ifdef HAVE_CONFIG_H #include "config.h" +#elif defined(_MSC_VER) +#include "config-msvc.h" +#endif #include <windows.h> #include <stdlib.h> #include <stdio.h> @@ -196,7 +200,7 @@ match (const WIN32_FIND_DATA *find, const char *ext) if (i < 1) return false; - return find->cFileName[i] == '.' && !strcasecmp (find->cFileName + i + 1, ext); + return find->cFileName[i] == '.' && !_stricmp (find->cFileName + i + 1, ext); } /* @@ -331,15 +335,15 @@ VOID ServiceStart (DWORD dwArgc, LPTSTR *lpszArgv) /* set process priority */ priority = NORMAL_PRIORITY_CLASS; - if (!strcasecmp (priority_string, "IDLE_PRIORITY_CLASS")) + if (!_stricmp (priority_string, "IDLE_PRIORITY_CLASS")) priority = IDLE_PRIORITY_CLASS; - else if (!strcasecmp (priority_string, "BELOW_NORMAL_PRIORITY_CLASS")) + else if (!_stricmp (priority_string, "BELOW_NORMAL_PRIORITY_CLASS")) priority = BELOW_NORMAL_PRIORITY_CLASS; - else if (!strcasecmp (priority_string, "NORMAL_PRIORITY_CLASS")) + else if (!_stricmp (priority_string, "NORMAL_PRIORITY_CLASS")) priority = NORMAL_PRIORITY_CLASS; - else if (!strcasecmp (priority_string, "ABOVE_NORMAL_PRIORITY_CLASS")) + else if (!_stricmp (priority_string, "ABOVE_NORMAL_PRIORITY_CLASS")) priority = ABOVE_NORMAL_PRIORITY_CLASS; - else if (!strcasecmp (priority_string, "HIGH_PRIORITY_CLASS")) + else if (!_stricmp (priority_string, "HIGH_PRIORITY_CLASS")) priority = HIGH_PRIORITY_CLASS; else { diff --git a/src/openvpnserv/openvpnserv.vcproj b/src/openvpnserv/openvpnserv.vcproj new file mode 100644 index 0000000..4c55561 --- /dev/null +++ b/src/openvpnserv/openvpnserv.vcproj @@ -0,0 +1,209 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="openvpnserv" + ProjectGUID="{9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}" + RootNamespace="openvpnserv" + Keyword="Win32Proj" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(PlatformName)-Output\$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="$(SOURCEBASE)" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;$(CPPFLAGS)" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + AdditionalIncludeDirectories="$(SOURCEBASE)" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="2" + GenerateDebugInformation="true" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(PlatformName)-Output\$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories="$(SOURCEBASE)" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;$(CPPFLAGS)" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + AdditionalIncludeDirectories="$(SOURCEBASE)" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\openvpnserv.c" + > + </File> + <File + RelativePath=".\service.c" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\service.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File + RelativePath=".\openvpnserv_resources.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/openvpnserv/openvpnserv_resources.rc b/src/openvpnserv/openvpnserv_resources.rc index 9845a8f..7eac95b 100644 --- a/src/openvpnserv/openvpnserv_resources.rc +++ b/src/openvpnserv/openvpnserv_resources.rc @@ -1,7 +1,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> #else -#include <config-msc-version.h> +#include <config-msvc-version.h> #endif #include <winresrc.h> diff --git a/src/openvpnserv/service.c b/src/openvpnserv/service.c index 91b5821..d7562b3 100644 --- a/src/openvpnserv/service.c +++ b/src/openvpnserv/service.c @@ -23,6 +23,11 @@ FUNCTIONS: ---------------------------------------------------------------------------*/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#elif defined(_MSC_VER) +#include "config-msvc.h" +#endif #include <windows.h> #include <stdio.h> #include <stdlib.h> diff --git a/src/openvpnserv/service.h b/src/openvpnserv/service.h index cf41ed7..e89a89f 100644 --- a/src/openvpnserv/service.h +++ b/src/openvpnserv/service.h @@ -57,8 +57,6 @@ Copyright (C) 1993 - 2000. Microsoft Corporation. All rights reserved. extern "C" { #endif -#include "config.h" - ////////////////////////////////////////////////////////////////////////////// //// todo: change to desired strings //// |