From: Lev Stipakov Date: Fri, 2 Oct 2015 11:46:41 +0000 (+0300) Subject: This fixes MSVS 2013 compilation. X-Git-Tag: v2.4_alpha1~236 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=123092a7a95f13f0509d2dc52ec049f91a02686d;p=thirdparty%2Fopenvpn.git This fixes MSVS 2013 compilation. * Tools version changed to 12 * Added comp.c/h and compat.c/h to project files * Workaround for missing __attribute__ support Also, as a preparation for MSVS2015, ensured that snprintf is not defined for that VS version. Acked-by: Gert Doering Message-Id: <1443786401-30416-1-git-send-email-lstipakov@gmail.com> URL: http://article.gmane.org/gmane.network.openvpn.devel/10174 Signed-off-by: Gert Doering --- diff --git a/config-msvc.h b/config-msvc.h index 8294c2c7c..ffd35f4f4 100644 --- a/config-msvc.h +++ b/config-msvc.h @@ -90,7 +90,10 @@ #define strncasecmp strnicmp #define strcasecmp _stricmp + +#if _MSC_VER<1900 #define snprintf _snprintf +#endif #if _MSC_VER < 1800 #define strtoull strtoul diff --git a/src/compat/compat.vcxproj b/src/compat/compat.vcxproj index 42979c119..7fca62fc0 100644 --- a/src/compat/compat.vcxproj +++ b/src/compat/compat.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -20,10 +20,12 @@ StaticLibrary MultiByte true + v120 StaticLibrary MultiByte + v120 @@ -84,4 +86,4 @@ - \ No newline at end of file + diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj index 3b2340ee4..b117b0b64 100755 --- a/src/openvpn/openvpn.vcxproj +++ b/src/openvpn/openvpn.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -20,10 +20,12 @@ Application true Unicode + v120 Application Unicode + v120 @@ -100,6 +102,8 @@ + + @@ -168,6 +172,8 @@ + + @@ -260,4 +266,4 @@ - \ No newline at end of file + diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index ba3b7e4a6..3aa5c5f19 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -47,6 +47,7 @@ #ifdef _MSC_VER // Visual Studio #define __func__ __FUNCTION__ +#define __attribute__(x) #endif #if defined(__APPLE__) diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj index 0b75ed01d..c6760daf5 100644 --- a/src/openvpnserv/openvpnserv.vcxproj +++ b/src/openvpnserv/openvpnserv.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -20,10 +20,12 @@ Application MultiByte true + v120 Application MultiByte + v120 @@ -109,4 +111,4 @@ - \ No newline at end of file +