This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ tests assumes all locale data are available
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 2 Dec 2002 12:27:33 -0800
- Subject: Re: libstdc++ tests assumes all locale data are available
- References: <20021202120442.A32407@lucon.org> <3DEBC069.2010802@unitus.it>
On Mon, Dec 02, 2002 at 09:19:53PM +0100, Paolo Carlini wrote:
> H. J. Lu wrote:
>
> >It doesn't look right to me since the de_DE locale may not be available
> >on the host machine. Shouldn't
> >
> > try
> > {
> > // Set the global locale to non-"C".
> > std::locale loc_de("de_DE");
> > std::locale::global(loc_de);
> >
> > // Set LANG environment variable to de_DE.
> > const char* oldLANG = getenv("LANG");
> > if (!setenv("LANG", "de_DE", 1))
> > {
> > test01();
> > setenv("LANG", oldLANG ? oldLANG : "", 1);
> > }
> > }
> > catch (runtime_error& obj)
> > {
> > cout << "de_DE: " << obj.what () << endl;
> > }
> >
> >be used instead?
> >
> Perhaps. However, Benjamin added some specific notes about this in the
> install documentation:
>
> http://gcc.gnu.org/onlinedocs/libstdc++/install.html
>
> In particular:
>
> If the 'gnu' locale model is being used, the following locales are used
> and tested in the libstdc++ testsuites: en_HK, en_US, fr_FR, fr_FR@euro,
> de_DE, de_DE@euro, ja_JP.eucjp, es_MX, en_PH, and it_IT. Failure to have
> the underlying "C" library locale information installed will mean that
> C++ named locales for the above regions will not work: because of this,
> the libstdc++ testsuite will not pass the named locale tests. If this
> isn't an issue, don't worry about it. If named locales are needed, the
> underlying locale information must be installed. Note that rebuilding
> libstdc++ after the "C" locales are installed is not necessary.
Those tests are meaningless. On RedHat, only selected locales are
installed. Personally, I will simply ingore all libstdc++ test
failures since most of them are bogus on my machines.
H.J.