Inconsistency in definitions of fputwc(), putwc() and putwchar() in glibc
Why fputwc() , putwc() and putwchar() take argument of type wchar_t instead of wint_t ? This contradicts corresponding non-wide character functions fputc() , putc() and putchar() , which take int , not char . tversteeg That is because wchar_t is required to hold an WEOF value and char is not required to hold an EOF value. For char , the fputc() , putc() and putchar() functions need to accept values which can hold both values in the unsigned char and EOF range, where EOF can be a negative number so a int is required to hold them both. 1 Whereas wchar_t itself is required to hold a WEOF