Am 04.12.2010 03:55, schrieb Matthias Andree: > 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.
Huh, something broke my GnuPG signature. It is OK in my "Sent" folder. Note that the patch shouldn't be committed with the original message, but is meant for testing. If it keeps working with whatever is normally used to build the Windows release of OpenVPN (GCC, and Visual Studio), feel free to commit with an updated comment though. -- Matthias Andree