The expat library does not seem to recognize MinGW and therefore does
not apply the Microsoft storage class attributes to its function
declarations when using MinGW. Defining XML_USE_MSC_EXTENSIONS forces
it to use those.
Fixes errors like this with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../common/CMakeFiles/common_obj.dir/htmllex.c.obj:htmllex.c:(.text+0x1cec): undefined reference to `XML_ParserCreate'
#include <stddef.h>
#ifdef HAVE_EXPAT
+#ifdef _WIN32
+// ensure that the expat functions get the correct storage class
+// declarations also on MinGW
+#define XML_USE_MSC_EXTENSIONS 1
+#endif
#include <expat.h>
#endif