#include <sys/cdefs.h>
__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 <stdio.h>
#include <wchar.h>
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));
}