Re: [Openvpn-devel] [PATCH] This fixes MSVS 2013 compilation.

2015-10-04 Thread Gert Doering
Hi,

On Fri, Oct 02, 2015 at 02:46:41PM +0300, Lev Stipakov wrote:
>  * Tools version changed to 12

What exactly does this do?  ("I should understand the side effects" :) )

>  * Added comp.c/h and compat.c/h to project files

The description is wrong, as it is compstub.c/.h - I'll fix this on
merging, so no need to re-send.

Did you also test building with the GetIpRoute2() patch in
http://thread.gmane.org/gmane.network.openvpn.devel/10085 ?  I'd like
to merge that, but it might break MSVC compilation due to the stray
typedef (which is needed because MinGW headers are incomplete in that
respect)

thanks,

gert

-- 
USENET is *not* the non-clickable part of WWW!
   //www.muc.de/~gert/
Gert Doering - Munich, Germany g...@greenie.muc.de
fax: +49-89-35655025g...@net.informatik.tu-muenchen.de


signature.asc
Description: PGP signature


[Openvpn-devel] [PATCH] This fixes MSVS 2013 compilation.

2015-10-02 Thread Lev Stipakov
 * 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.
---
 config-msvc.h   |  3 +++
 src/compat/compat.vcxproj   |  6 --
 src/openvpn/openvpn.vcxproj | 10 --
 src/openvpn/syshead.h   |  1 +
 src/openvpnserv/openvpnserv.vcxproj |  6 --
 5 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/config-msvc.h b/config-msvc.h
index 8294c2c..ffd35f4 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 42979c1..7fca62f 100644
--- a/src/compat/compat.vcxproj
+++ b/src/compat/compat.vcxproj
@@ -1,5 +1,5 @@
 
-http://schemas.microsoft.com/developer/msbuild/2003;>
+http://schemas.microsoft.com/developer/msbuild/2003;>
   
 
   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 3b2340e..b117b0b 100755
--- a/src/openvpn/openvpn.vcxproj
+++ b/src/openvpn/openvpn.vcxproj
@@ -1,5 +1,5 @@
 
-http://schemas.microsoft.com/developer/msbuild/2003;>
+http://schemas.microsoft.com/developer/msbuild/2003;>
   
 
   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 4bebb25..92f5834 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 0b75ed0..c6760da 100644
--- a/src/openvpnserv/openvpnserv.vcxproj
+++ b/src/openvpnserv/openvpnserv.vcxproj
@@ -1,5 +1,5 @@
 
-http://schemas.microsoft.com/developer/msbuild/2003;>
+http://schemas.microsoft.com/developer/msbuild/2003;>
   
 
   Debug
@@ -20,10 +20,12 @@
 Application
 MultiByte
 true
+v120
   
   
 Application
 MultiByte
+v120
   
   
   
@@ -109,4 +111,4 @@
   
   
   
-
\ No newline at end of file
+
-- 
1.9.1