Bug 65238

Summary: Use ansi stdio extensions when using a mingw compiler
Product: poppler Reporter: Hib Eris <hib>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: hib
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Use ansi stdio extensions when using a mingw compiler
Fix cmake build to use ansi stdio extensions when using a mingw compiler

Description Hib Eris 2013-06-01 10:50:50 UTC
In the C runtime used by mingw compilers (msvcrt.dll) the printf
function does not support the C99 format-width specifier "%ll".

Defining __USE_MINGW_ANSI_STDIO enables mingw's ansi stdio extensions
that implement a C99 compliant printf function.
Comment 1 Hib Eris 2013-06-01 10:58:04 UTC
Created attachment 80126 [details] [review]
Use ansi stdio extensions when using a mingw compiler

In the C runtime used by mingw compilers (msvcrt.dll) the printf
function does not support the C99 format-width specifier "%ll".

Defining __USE_MINGW_ANSI_STDIO enables mingw's ansi stdio extensions
that implement a C99 compliant printf function.
Comment 2 Albert Astals Cid 2013-06-01 12:03:28 UTC
Commited.
Comment 3 Fabio D'Urso 2013-06-02 15:47:43 UTC
There's an identical copy of GCC_PRINTF_FORMAT in poppler/poppler-config.h.cmake
Does it need to be patched too?
Comment 4 Hib Eris 2013-06-03 06:51:13 UTC
Created attachment 80182 [details] [review]
Fix cmake build to use ansi stdio extensions when using a mingw compiler
Comment 5 Hib Eris 2013-06-03 06:53:00 UTC
(In reply to comment #3)
> There's an identical copy of GCC_PRINTF_FORMAT in
> poppler/poppler-config.h.cmake
> Does it need to be patched too?

Right! Thanks. Patch in attachment 80182 [details] [review].
Comment 6 Albert Astals Cid 2013-06-03 17:40:01 UTC
Commited again, thanks to both of you guys

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.