On Tue, Jun 16, 2015 at 12:26:39AM -0400, Rich Felker wrote: > On Sat, Jun 13, 2015 at 03:06:55AM -0400, Rich Felker wrote: > > diff --git a/src/multibyte/btowc.c b/src/multibyte/btowc.c > > index 9d2c3b1..8de060f 100644 > > --- a/src/multibyte/btowc.c > > +++ b/src/multibyte/btowc.c > > @@ -1,7 +1,10 @@ > > -#include > > #include > > +#include > > +#include "internal.h" > > > > wint_t btowc(int c) > > { > > - return c<128U ? c : EOF; > > + if (c < 128U) return c; > > + if (MB_CUR_MAX==1) return CODEUNIT(c); > > + return WEOF; > > } > > This was mildly buggy before the patch, and worse with it -- c==EOF > will no longer produce WEOF. Fixed the old bug and updating the patch. Updated version of this file's patch (against the fixed old code which I already committed) is attached. Rich