win32: Use __MINGW_PRINTF_FORMAT instead of __printf__ for MinGW builds
authorPatrick Gaskin <patrick@pgaskin.net>
Sun, 3 Jan 2021 09:07:07 +0000 (04:07 -0500)
committerPulseAudio Marge Bot <pulseaudio-maintainers@lists.freedesktop.org>
Wed, 13 Jan 2021 03:42:24 +0000 (03:42 +0000)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/458>

src/pulse/gccmacro.h

index 81729db..4a0fff5 100644 (file)
 
 #if defined(__GNUC__)
 #ifdef __MINGW32__
-/* libintl overrides printf with a #define. As this breaks this attribute,
- * it has a workaround. However the workaround isn't enabled for MINGW
- * builds (only cygwin) */
-#define PA_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (__printf__, a, b)))
+#include <stdio.h>
+#define PA_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (__MINGW_PRINTF_FORMAT, a, b)))
 #else
 #define PA_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
 #endif