MSVC does not define it by default or even if you specify -std:c*, there is a separated option to enable it [1] (only in new MSVC and clang does not yet seem to implement it). so clang is compatible in this aspect and that's what MSVC-aware code expects. I think that the current behavior would not be considered a bug upstream.
Yes, it's compatible with Microsoft's broken definition of `__STDC__`, but that doesn't mean it's a good idea.
Would you prefer if I change the logic to make clang use current mingw behavior (instead of the other way around)?
The code changes are fine, but I think in the headers we may as well stop checking `__STDC__` altogether, since MS has made that meaningless.