Thanks for your response. I'll ship a patch for master soon :-)

Best,
Fish

-----Original Message-----
From: Gert Doering [mailto:g...@greenie.muc.de] 
Sent: Friday, January 8, 2016 10:23 AM
To: Fish <fish.t...@gmail.com>
Cc: openvpn-devel@lists.sourceforge.net
Subject: Re: [Openvpn-devel] [PATCH] Make MSVC happy about route.c

Hi,

On Mon, Dec 14, 2015 at 01:06:16PM -0800, Fish wrote:
> Move the definition of out to the beginning of functions to comply with
> old-style C compilers. Tested on MSVC 2010.
[..]
>  #elif defined (WIN32)
> -
> -  struct buffer out = alloc_buf_gc (64, &gc);
> +  out = alloc_buf_gc(64, &gc);
>    buf_printf (&out, "interface=%d", tt->adapter_index );
>    device = buf_bptr(&out);

As things turns out, this is now actually no longer needed in the 
release/2.3 branch, as with the new code from Lev, this looks like:

#elif defined (WIN32)

  if (win32_version_info() != WIN_XP)
    {
      struct buffer out = alloc_buf_gc (64, &gc);
      buf_printf (&out, "interface=%d", tt->adapter_index );
      device = buf_bptr(&out);
    }

... and as such, avoids this VS2010 pitfall (thanks anyway!).

Master still has problematic code here, so if VS2010 compatibility is
desired, I'd appreciate a patch for it.

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-35655025
g...@net.informatik.tu-muenchen.de


Reply via email to