‘__ctype_touplow_t’ and ‘__ctype_mask_t’ does not name a type

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Mar 22 20:54:57 UTC 2013


On Thu, Mar 14, 2013 at 01:58:24PM -0500, Jorge Ventura wrote:
>Subject: ‘__ctype_touplow_t’ and ‘__ctype_mask_t’ does not name a type
>
>
>Hi,
>
>I am trying to compile one code and I am getting the following errors:
>
>buildroot-2013.02/output/host/usr/lib/gcc/i586-buildroot-linux-uclibc/4.6.3/../../../../i586-buildroot-linux-uclibc/include/c++/4.6.3/i586-buildroot-linux-uclibc/bits/ctype_base.h:47:19:
>*error: ‘__ctype_touplow_t’ does not name a type
>*
>buildroot-2013.02/output/host/usr/lib/gcc/i586-buildroot-linux-uclibc/4.6.3/../../../../i586-buildroot-linux-uclibc/include/c++/4.6.3/i586-buildroot-linux-uclibc/bits/ctype_base.h:51:13:
>*error: ‘__ctype_mask_t’ does not name a type*
>
>Taking a look in the source ctype_base.h I found the comment:
>
>namespace std _GLIBCXX_VISIBILITY(default)
>{
>_GLIBCXX_BEGIN_NAMESPACE_VERSION
>
>  /// @brief  Base class for ctype.
>  struct ctype_base
>  {
>    *// Note: In uClibc, the following two types depend on configuration.*
>
>    // Non-standard typedefs.
>    typedef const __ctype_touplow_t* __to_type;
>
>    // NB: Offsets into ctype<char>::_M_table force a particular size
>    // on the mask type. Because of this, we don't use an enum.
>    typedef __ctype_mask_t      mask;
>    static const mask upper     = _ISupper;
>    static const mask lower     = _ISlower;
>    static const mask alpha     = _ISalpha;
>
>It seems that something is missing in my uClibc configuration that cause
>the two types be undefined an include is missing in the code that I am
>trying to compile.
>
>Someone has any clue about this problem?

As already stated the c++ locale support should be redone properly.
A stopgap thing is

http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-January/028739.html

I am not convinced that GCC would take that hunks above so never bothered
to really ask, TBH. Perhaps i should revisit this one sometimes.

Bernd,
do you think that something like
http://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-4.7/gcc-uclibc-locale-ctype_touplow_t.patch
would be acceptable?

We are using this since years now, fwiw.
thanks,


More information about the uClibc mailing list