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.
This commit is contained in:
Vadim Zeitlin
2021-06-15 14:15:22 +02:00
parent 482eb2fa87
commit 0a166474f8

View File

@@ -38,18 +38,9 @@
#include "catch.hpp"
#if defined(__WXMSW__)
#include <windows.h>
// Avoid warnings about redeclaring standard functions such as chmod() in
// various standard headers when using MinGW/Cygwin.
#if defined(__MINGW32__) || defined(__CYGWIN__)
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include <io.h>
#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 <QtGui/QFont>
#endif