Hmm... I see a potential cause for this in /mingw/include/winbase.h at
line 2188.  If you move line 2188 to line 2190 does that help?

Thanks for the suggestion, but unfortunately this doesn't solve the problem.
We still get the exact same build errors.
 
If that doesn't help does the application perhaps define UNICODE
and/or _UNICODE after the inclusion of any header?  If so the define
for UNICODE and _UNICODE need to move before the inclusion of any
header.

I double-checked this and mades sure that UNICODE/_UNICODE are not defined
in the target source (I went as far as to #undef UNICODE and _UNICODE just to be 
sure).

It does seem to be somehow related to an interaction with winbase.h though. I still
don't know if the problem is in the project source or just how we're using the latest
MinGW (i.e. if there's some set of compile flags we should be using that we didn't
need for the 4.6.2 version).

We'll keep digging.

Thanks,
Demetri