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".