diff options
Diffstat (limited to 'freebsd/lib/libc/stdio/local.h')
-rw-r--r-- | freebsd/lib/libc/stdio/local.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/freebsd/lib/libc/stdio/local.h b/freebsd/lib/libc/stdio/local.h index a9994b5f..664ca3b3 100644 --- a/freebsd/lib/libc/stdio/local.h +++ b/freebsd/lib/libc/stdio/local.h @@ -56,8 +56,8 @@ extern int _ftello(FILE *, fpos_t *); extern int _fseeko(FILE *, off_t, int, int); extern int __fflush(FILE *fp); extern void __fcloseall(void); +extern wint_t __fgetwc_mbs(FILE *, mbstate_t *, int *, locale_t); #ifndef __rtems__ -extern wint_t __fgetwc(FILE *, locale_t); extern wint_t __fputwc(wchar_t, FILE *, locale_t); #endif /* __rtems__ */ extern int __sflush(FILE *); @@ -104,6 +104,13 @@ extern size_t __fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict fp); extern int __sdidinit; +static inline wint_t +__fgetwc(FILE *fp, locale_t locale) +{ + int nread; + + return (__fgetwc_mbs(fp, &fp->_mbstate, &nread, locale)); +} /* * Prepare the given FILE for writing, and return 0 iff it |