[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] stdio: fix use of PRIdMAX on modern mingw

From: Pádraig Brady
Subject: Re: [PATCH] stdio: fix use of PRIdMAX on modern mingw
Date: Mon, 05 Jan 2015 23:18:14 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 05/01/15 23:03, Eric Blake wrote:
> Commit cf88e56ab broke the use of PRIdMAX and friends on modern
> mingw64 installations.  Basically, when requesting
> _USE_MINGW_ANSI_STDIO, not only does mingw turn on support for %lld,
> it also rewrites <inttypes.h> to provide PRIdMAX as "lld" instead of
> "I64d" (but only when <stdio.h> is also included).  But if a user is
> NOT using the gnulib printf module, gnulib's <stdio.h> was still
> giving printf() the system printf attribute, which causes the
> compiler to then complain about an unknown %lld specifier, even though
> we know we don't need to use the non-standard %I64d.  So this patch
> adds a configure-time probe that should work with older gcc (which
> does not differentiate between printf flavors) and older mingw (where
> _USE_MINGW_ANSI_STDIO has no impact on behavior), while fixing the
> mismatch in flavors on modern systems.
> * m4/stdio_h.m4 (gl_STDIO_H): Probe for printf flavor via inttypes.
> * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): Use result
> to work with modern mingw.

Very nice.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]