From 1e98f88776fc606df245a382685b1ac634a81389 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 17 Apr 2008 22:17:54 +0000 Subject: Next stage of stdio cleanup: Retire __sFILEX and merge the fields back into __sFILE. This was supposed to be done in 6.0. Some notes: - Where possible I restored the various lines to their pre-__sFILEX state. - Retire INITEXTRA() and just initialize the wchar bits (orientation and mbstate) explicitly instead. The various places that used INITEXTRA didn't need the locking fields or _up initialized. (Some places needed _up to exist and not be off the end of a NULL or garbage pointer, but they didn't require it to be initialized to a specific value.) - For now, stdio.h "knows" that pthread_t is a 'struct pthread *' to avoid namespace pollution of including all the pthread types in stdio.h. Once we remove all the inlines and make __sFILE private it can go back to using pthread_t, etc. - This does not remove any of the inlines currently and does not change any of the public ABI of 'FILE'. MFC after: 1 month Reviewed by: peter --- lib/libc/stdio/fgetwc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/stdio/fgetwc.c') diff --git a/lib/libc/stdio/fgetwc.c b/lib/libc/stdio/fgetwc.c index 719556ad9e1f..3a5b09b9ae7b 100644 --- a/lib/libc/stdio/fgetwc.c +++ b/lib/libc/stdio/fgetwc.c @@ -71,7 +71,7 @@ __fgetwc(FILE *fp) return (wc); } do { - nconv = __mbrtowc(&wc, fp->_p, fp->_r, &fp->_extra->mbstate); + nconv = __mbrtowc(&wc, fp->_p, fp->_r, &fp->_mbstate); if (nconv == (size_t)-1) break; else if (nconv == (size_t)-2) -- cgit v1.2.3