use __WCHAR_TYPE__ on i386 if it is defined
authorRich Felker <dalias@aerifal.cx>
Tue, 7 Jun 2011 15:26:42 +0000 (11:26 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 7 Jun 2011 15:26:42 +0000 (11:26 -0400)
unfortunately traditional i386 practice was to use "long" rather than
"int" for wchar_t, despite the latter being much more natural and
logical. we followed this practice, but it seems some compilers (clang
and maybe certain gcc builds or others too..?) have switched to using
int, resulting in spurious pointer type mismatches when L"..." wide
strings are used. the best solution I could find is to use the
compiler's definition of wchar_t if it exists, and otherwise fallback
to the traditional definition.

there's no point in duplicating this approach on 64-bit archs, as
their only 32-bit type is int.


No differences found