I wrote: > In the particular case of 'wint_t': The problem is no such much that > wint_t = 'unsigned short' > is not unchanged by argument promotions, but rather that this type > is not larger than 'wchar_t'. This piece of code > > wint_t c = getwchar(); > if (c == WEOF) goto eof_handling; > > is only correct when wint_t is larger than wchar_t. The original > definition of WEOF is (wint_t)0xFFFF.
Oops, gnulib actually redefines wint_t but not WEOF. I was too shy to redefine WEOF. So, the only reason why gnulib redefines wint_t is standards compliance (ISO C 99 section 7.24.1.(2), to be precise). Bruno
