*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/getwc.c,v 1.2 2002/09/28 07:43:44 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/getwc.c,v 1.3 2004/05/25 10:42:52 tjr Exp $");
+
+#include "xlocale_private.h"
#include "namespace.h"
#include <stdio.h>
#include "libc_private.h"
#include "local.h"
+#undef getwc
+
/*
* Synonym for fgetwc(). The only difference is that getwc(), if it is a
* macro, may evaluate `fp' more than once.
getwc(FILE *fp)
{
- return (fgetwc(fp));
+ return (fgetwc_l(fp, __current_locale()));
+}
+
+wint_t
+getwc_l(FILE *fp, locale_t loc)
+{
+
+ /* no need to call NORMALIZE_LOCALE(loc) because fgetwc_l will */
+ return (fgetwc_l(fp, loc));
}