Zebediah Figura : include: Use __MINGW_PRINTF_FORMAT when compiling with MinGW.
Module: vkd3d Branch: master Commit: 303ce66cef72d33d429dd6a51962fb23567b602a URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/303ce66cef72d33d429dd6a51962fb... Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Feb 23 14:55:01 2021 -0600 include: Use __MINGW_PRINTF_FORMAT when compiling with MinGW. The default for MinGW is always ms_printf rather than gnu_printf, but if we are using ucrtbase or ANSI stdio, we want gnu_printf. --- include/private/vkd3d_common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h index 9a2de265..78a15c19 100644 --- a/include/private/vkd3d_common.h +++ b/include/private/vkd3d_common.h @@ -54,7 +54,11 @@ static inline size_t align(size_t addr, size_t alignment) #ifdef __GNUC__ # define VKD3D_NORETURN __attribute__((noreturn)) -# define VKD3D_PRINTF_FUNC(fmt, args) __attribute__((format(printf, fmt, args))) +# ifdef __MINGW_PRINTF_FORMAT +# define VKD3D_PRINTF_FUNC(fmt, args) __attribute__((format(__MINGW_PRINTF_FORMAT, fmt, args))) +# else +# define VKD3D_PRINTF_FUNC(fmt, args) __attribute__((format(printf, fmt, args))) +# endif # define VKD3D_UNUSED __attribute__((unused)) # define VKD3D_UNREACHABLE __builtin_unreachable() #else
participants (1)
-
Alexandre Julliard