wchar/wstring support in C++

Karel Gardas kgardas at objectsecurity.com
Thu Jan 13 18:22:49 UTC 2005


Hello,

just for the record I will reply to myself. I've investigated a bit why
even when using gcc3.4.3/newlib1.13 combination wchar/wstring support in
libstdc++ is still disabled. The reason is this code in libstdc++'s
aclocal.m4 file:

    # At the moment, only enable wchar_t specializations if all the
    # above support is present.
    if test x"$ac_isoC99_wchar_t" = xyes &&
       test x"$ac_XPG2_wchar_t" = xyes;
    then
      AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
      enable_wchar_t=yes
    fi

at least ac_isoC99_wchar_t == no here, since underlaying newlib does not
provide enhanced C99 wchar support, i.e. functions: wcstold, wcstoll,
wcstoull.

For basic MICO[1] port, missing wchar/wstring support is not showstopper,
so I will now postpone workarounding this "issue" with some ugly hack, but
for later port of OpenPMF[2] missing wstring is indeed an issue, so I will
get back to this hopefully in the future.

Cheers,
Karel

[1]: http://www.mico.org
[2]: http://www.openpmf.org

On Tue, 11 Jan 2005, Karel Gardas wrote:

>
> Hello,
>
> it seems that 4.6.2 release tool-chain does not support wchar/wstring
> types in C++ language (libstdc++). On the other hand it seems that
> underlaying newlib supports needed wchar.h header and functions
> definitions. Is there any trick how to make wchar/wstring support working
> in libstdc++?
>
> Thanks,
> Karel
> --
> Karel Gardas                  kgardas at objectsecurity.com
> ObjectSecurity Ltd.           http://www.objectsecurity.com
>
>

--
Karel Gardas                  kgardas at objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com




More information about the users mailing list