build: Fix MSVC warning due to Pango bug

Pango unconditionally defines STRICT, which we use, see
https://learn.microsoft.com/en-us/windows/win32/winprog/enabling-strict

And that causes a duplicate definition, so we undefined it before
including the offending Pango header.

See also https://gitlab.gnome.org/GNOME/pango/-/merge_requests/749
This commit is contained in:
Benjamin Otte
2024-10-21 07:21:03 +02:00
parent 9a59fce106
commit a74457697e
3 changed files with 3 additions and 0 deletions

View File

@@ -27,6 +27,7 @@
#include "gdkprivate-win32.h"
#include "gdkdisplay-win32.h"
#undef STRICT
#include <pango/pangowin32.h>
struct _GdkWin32ALPNSink

View File

@@ -56,6 +56,7 @@
#include <pango/pangofc-fontmap.h>
#endif
#ifdef HAVE_PANGOWIN32
#undef STRICT
#include <pango/pangowin32.h>
#endif

View File

@@ -40,6 +40,7 @@
#include "gtk/deprecated/gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#undef STRICT
#include <pango/pangowin32.h>
/* Determines what happens when focus is lost while preedit is in process. */