On 12/08/2014 04:14 PM, Eric Blake wrote:
> where, if no fprintf module is used, then we are FORCING the system
> printf format, so gcc thinks that %lld is unsupported - but at the same
> time, mingw's <inttypes.h> has conditional logic that defines PRIdMAX to
> "lld" instead of "I64d" when we have turned on proper printf.
> 
> It looks like we need to rethink the logic in stdio.h to unconditionally
> use __gnu_printf__ when we are sure that the mingw define actually makes
> a difference, so that the rest of the code base can just blindly use %lld.

At this point, I'm thinking the stdio module needs a configure-time test
to see whether PRIdMAX is equivalent to "lld" or not, and set a witness
preprocessor variable that stdin.in.h then uses to decide between blind
use of __gnu_printf__ vs. system __printf__ attributes (since we still
want to work on older mingw, that lacks the newer mingw64 magic for
supporting %lld).  Bummer that the preprocessor can't do string
comparison natively.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to