diff --git a/include/wx/defs.h b/include/wx/defs.h index 62146f3baf..4a6d0f7fb2 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -205,12 +205,6 @@ #define __cplusplus #endif /* __DECCXX */ -/* Prevents conflicts between sys/types.h and winsock.h with Cygwin, */ -/* when using Windows sockets. */ -#if defined(__CYGWIN__) && defined(__WINDOWS__) -#define __USE_W32_SOCKETS -#endif - #if defined(_MSVC_LANG) /* We want to always use the really supported C++ standard when using MSVC diff --git a/include/wx/msw/gccpriv.h b/include/wx/msw/gccpriv.h index 26f68d18c7..1ec54f90bb 100644 --- a/include/wx/msw/gccpriv.h +++ b/include/wx/msw/gccpriv.h @@ -88,6 +88,12 @@ #define __CYGWIN10__ #endif +/* Prevents conflicts between sys/types.h and winsock.h with Cygwin, */ +/* when using Windows sockets. */ +#if defined(__CYGWIN__) + #define __USE_W32_SOCKETS +#endif + /* Traditional MinGW (but not MinGW-w64 nor TDM-GCC) omits many POSIX functions from their headers when compiled with __STRICT_ANSI__ defined. diff --git a/tests/allheaders.cpp b/tests/allheaders.cpp index 6295d897c1..73e460703c 100644 --- a/tests/allheaders.cpp +++ b/tests/allheaders.cpp @@ -44,9 +44,9 @@ // We have to include this one first in order to check for wxUSE_XXX below. #include "wx/setup.h" -// Normally this is done in wx/defs.h, but as we don't include it here, we need -// to do it manually to avoid warnings inside the standard headers included -// from catch.hpp. +// Normally this is done in include/wx/msw/gccpriv.h included from wx/defs.h, +// but as we don't include it here, we need to do it manually to avoid warnings +// inside the standard headers included from catch.hpp. #if defined(__CYGWIN__) && defined(__WINDOWS__) #define __USE_W32_SOCKETS #endif