On Sun, Sep 18, 2016 at 2:59 AM, Gert Doering <g...@greenie.muc.de> wrote:
> Ah. Here we go... trying to redefine WIN32 at the end of syshead.h > shows what is happening: > > In file included from /usr/share/mingw-w64/include/windef.h:8:0, > from /usr/share/mingw-w64/include/windows.h:69, > from /usr/share/mingw-w64/include/winsock2.h:23, > from ../../src/compat/compat.h:29, > from syshead.h:28, > > so compat.h is pulling it via > > #ifdef HAVE_WINSOCK2_H > #include <winsock2.h> > #endif > > whee... > Yeah, to me that only confirms my feeling that #ifdef WIN32 is not reliable. Much better to use _WIN32 which appears to be defined by all (?) C compilers that support windows and doesn't require any particular header to be included. http://nadeausoftware.com/articles/2012/01/c_c_tip_how_ use_compiler_predefined_macros_detect_operating_system# WindowsCygwinnonPOSIXandMinGW Anyway, right now the priority being un-break building on windows, your v2 looks good. I'll test it and report back. Thanks, Selva
------------------------------------------------------------------------------
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel