|
From: | Paul Eggert |
Subject: | Re: [PATCH] stdio: fix probe on mingw under gcc 5.1 |
Date: | Wed, 20 May 2015 22:01:34 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
Eric Blake wrote:
I'm still open to any cleaner test, easy enough to maintain.
All we care about is (1) is it MingW and (2) has it defined PRIdMAX to be "lld" or to be "I64d". Is that right? If so, the first we can tell via inspecting a predefined preprocessor macro, and the second we can tell by a horrible trick like this:
/* Do this test only on MingW. */ char PRIdMAX_is_I64d[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; which will give us a compile-time failure if PRIdMAX is "lld".
[Prev in Thread] | Current Thread | [Next in Thread] |