From 0a166474f80ca43fe08e610a75c843b3c14988ef Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 15 Jun 2021 14:15:22 +0200 Subject: [PATCH] Don't include MSW headers in allheaders test This extends the changes of e0005c1d93 (No longer include the system headers first, 2021-04-22) to the platform-specific headers included for Cygwin/MinGW wxMSW builds, as this shouldn't be necessary neither any more (but doing it for wxQt is still needed, for the reasons explained in the new comment added by this commit). It also incidentally fixes a problem in Cygwin build since enabling IPv6 in 8dfcb582da (Regenerate configure after enabling IPv6 support by default, 2021-06-15) as including unistd.h directly results in warnings if wx/defs.h, which predefines __USE_W32_SOCKETS, hadn't been included before. --- tests/allheaders.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/tests/allheaders.cpp b/tests/allheaders.cpp index 2663573da1..87cd9d58f3 100644 --- a/tests/allheaders.cpp +++ b/tests/allheaders.cpp @@ -38,18 +38,9 @@ #include "catch.hpp" -#if defined(__WXMSW__) - #include - - // Avoid warnings about redeclaring standard functions such as chmod() in - // various standard headers when using MinGW/Cygwin. - #if defined(__MINGW32__) || defined(__CYGWIN__) - #include - #include - #include - #include - #endif -#elif defined(__WXQT__) +#if defined(__WXQT__) + // Include this one before enabling the warnings as doing it later, as it + // happens when it's included from wx/fontutil.h, results in -Wsign-promo. #include #endif