From 09f952639788a87cc0d1fb978637685959524127 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Mon, 3 Jun 2013 08:49:37 +0200 Subject: [PATCH] Fix cmake build to use ansi stdio extensions when using a mingw compiler https://bugs.freedesktop.org/show_bug.cgi?id=65238 --- poppler/poppler-config.h.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/poppler/poppler-config.h.cmake b/poppler/poppler-config.h.cmake index 13a92fe..bb870f4 100644 --- a/poppler/poppler-config.h.cmake +++ b/poppler/poppler-config.h.cmake @@ -158,8 +158,13 @@ char * strtok_r (char *s, const char *delim, char **save_ptr); //------------------------------------------------------------------------ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +#ifdef __USE_MINGW_ANSI_STDIO +#define GCC_PRINTF_FORMAT(fmt_index, va_index) \ + __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index))) +#else #define GCC_PRINTF_FORMAT(fmt_index, va_index) \ __attribute__((__format__(__printf__, fmt_index, va_index))) +#end #else #define GCC_PRINTF_FORMAT(fmt_index, va_index) #endif -- 1.8.1.2