[libstdc++] Don't access fpos_t.__state on uClibc w/o wchar support
Bernardo Innocenti
bernie@develer.com
Mon Sep 22 20:01:00 GMT 2003
Gabriel Dos Reis wrote:
> Bernardo Innocenti <bernie@develer.com> writes:
>
> | Don't access __state member of fpos_t when building on uClibc with
> | wchar support disabled.
>
> | +#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)
>
> Why can't you use the standard idiom
>
> #if _GLIBCXX_USE_WCHAR_T
>
> ?
You're most probably right. I'm not sure what specific feature
I need to check for.
On uClibc, the fpos_t structure has an __mbstate member only
if __STDIO_MBSTATE is defined, which in turn depends on
__STDIO_WIDE, which depends on __UCLIBC_HAS_WCHAR__.
glibc always has the __state member in fpos_t regardless of
the configuration.
In my configuration I use neither wchar nor mbstate support,
so it's fine for me to use _GLIBCXX_USE_WCHAR_T, but is that
really appropriate?
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/
Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html
More information about the Libstdc++
mailing list