Eli Zaretskii wrote:
I'm not sure I understand how this is different from what e.g. Gnulib's wchar.h already does. Can you point out the crucial differences?
Ah, I didn't look at lib/wchar.in.h. Yes, it's already doing that, with a complicated ifdef that is supposed to work on MinGW. It isn't working for you, I suppose because MinGW's include-file internals have changed. So, what's different about your MinGW's include-file internals?
Maybe you're using a 64-bit MinGW, say? wchar.in.h seems to know only about 32-bit.