X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/3d9156a7a519a5e3aa1b92e9d9d4b991f1aed7ff..refs/heads/master:/stdio/FreeBSD/getwchar.c diff --git a/stdio/FreeBSD/getwchar.c b/stdio/FreeBSD/getwchar.c index 1297cbb..f5c2dd6 100644 --- a/stdio/FreeBSD/getwchar.c +++ b/stdio/FreeBSD/getwchar.c @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD: src/lib/libc/stdio/getwchar.c,v 1.3 2004/05/25 10:42:52 tjr Exp $"); +#include "xlocale_private.h" + #include "namespace.h" #include #include @@ -43,5 +45,13 @@ wint_t getwchar(void) { - return (fgetwc(stdin)); + return (fgetwc_l(stdin, __current_locale())); +} + +wint_t +getwchar_l(locale_t loc) +{ + + /* no need to call NORMALIZE_LOCALE(loc) because fgetwc_l will */ + return (fgetwc_l(stdin, loc)); }