X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Ffgetwc.c;h=8626d54caa5dba9a5513da8ffaf180652443bf12;hb=41d7c77d6a2e74294807d35062e4cd1d48ab72d3;hp=77b30fd18df076664895f8d6eff2182039cccea2;hpb=a8c17e6587e68c4330999dd408d4add1d81296bf;p=musl diff --git a/src/stdio/fgetwc.c b/src/stdio/fgetwc.c index 77b30fd1..8626d54c 100644 --- a/src/stdio/fgetwc.c +++ b/src/stdio/fgetwc.c @@ -1,4 +1,6 @@ #include "stdio_impl.h" +#include +#include wint_t __fgetwc_unlocked(FILE *f) { @@ -23,9 +25,9 @@ wint_t __fgetwc_unlocked(FILE *f) } } else l = -2; - /* Convert character byte-by-byte from __uflow */ + /* Convert character byte-by-byte */ while (l == -2) { - b = c = __uflow(f); + b = c = getc_unlocked(f); if (c < 0) { if (!mbsinit(&st)) errno = EILSEQ; return WEOF; @@ -34,7 +36,6 @@ wint_t __fgetwc_unlocked(FILE *f) if (l == -1) return WEOF; } - FUNLOCK(f); return wc; }