Matthias Andree ha scritto:
> Am 03.12.2010 16:22, schrieb Samuli Seppänen:
>   
>> Hi,
>>
>> I've managed to extend the Python build system so that it now tries to
>> build the Windows service wrapper, "openvpnserv.exe", after building
>> "openvpn.exe". However, the Visual Studio 2008 C compiler gives these
>> errors:
>>
>>    openvpnserv.c(87): error C2010: '.' : unexpected in macro formal
>> parameter list
>>    openvpnserv.c(101): error C2010: '.' : unexpected in macro formal
>> parameter list
>>
>> The offending lines with context (in beta2.2 branch) are these:
>>
>>    #define mysnprintf(out, args...) \
>>    ...
>>    #define MSG(flags, args...) \
>>
>> The C2010 error is described (very briefly) here:
>>
>> <http://msdn.microsoft.com/en-us/library/64sxk83h.aspx>
>>
>> Any ideas how to fix this issue?
>>     
>
> Hi Samuli,
>
> What you see in the offending lines is GCC's old syntax for variadic macros.  
> If
> Visual Studio 2008 understands C99 sufficiently, you could #ifdef around this
> and use the current form in the code for GCC compilers, and the C99 form for 
> others.
>
> See http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html#Variadic-Macros for
> an explanation.
>
> Please try the attached patch - note I haven't been able to test this beyond
> making sure it compiles on GCC 4.3.
>
> HTH.
>
> Best regards
> Matthias
>   
Hi Matthias,

Your patch fixes the issue.

Thanks!

-- 
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock


Reply via email to