in its system headers, and is not really compatible with values
lower than 0x0500, so leave it alone. */
#ifndef MINGW_W64
+# undef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
#endif
return fmt[SVG_FILE].count + fmt[SVG_DATA].count == 1;
}
+/* Some versions of glib's gatomic.h define MemoryBarrier, but MinGW
+ w32api 3.18 and later has its own definition. The following gross
+ hack avoids the clash. */
+# ifdef WINDOWSNT
+# if (__W32API_MAJOR_VERSION + (__W32API_MINOR_VERSION >= 18)) >= 4
+# define W32_SAVE_MINGW_VERSION __MINGW_MAJOR_VERSION
+# undef __MINGW_MAJOR_VERSION
+# define __MINGW_MAJOR_VERSION 4
+# endif
+# endif
+
# include <librsvg/rsvg.h>
# ifdef WINDOWSNT
+/* Restore the original definition of __MINGW_MAJOR_VERSION. */
+# ifdef W32_SAVE_MINGW_VERSION
+# undef __MINGW_MAJOR_VERSION
+# define __MINGW_MAJOR_VERSION W32_SAVE_MINGW_VERSION
+# ifdef __MINGW_MAJOR_VERSION
+# undef W32_SAVE_MINGW_VERSION
+# endif
+# endif
+
/* SVG library functions. */
DEF_DLL_FN (RsvgHandle *, rsvg_handle_new, (void));
DEF_DLL_FN (void, rsvg_handle_get_dimensions,