This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libstdc++] Don't access fpos_t.__state on uClibc w/o wchar support


Bernardo Innocenti <bernie@develer.com> writes:

| 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?

yes please.  see comment in acconfig.h

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]