win32: Use __MINGW_PRINTF_FORMAT instead of __printf__ for MinGW builds

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/458>
This commit is contained in:
Patrick Gaskin 2021-01-03 04:07:07 -05:00 committed by PulseAudio Marge Bot
parent fc002e4dc6
commit 7ac0d90615

View file

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