This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

[libstdc++ testsuite][patch] many locale tests only SUPPORTED on linux, start making these portable


There are a few issues with the locales portion of the libstdc++
testsuite.  These issues stem from the fact that much about locales are
not standardized, such as the names of the encodings, how to handle
abbreviated versions of named locales, and modifiers (e.g. @euro,
@preeuro).  Compounding the problem is that many of test themselves are
Linux specific.

The attached large patch makes a dent with an effort to resolve this
issues.  This patch has been scoped to only standardise the names of the
locales.  There is no net effect on Linux, but it allows many more tests
to be considered on other systems, including *BSD.

Some types of changes are:
1) convert abreviations to full names (e.g. "de_DE" => "de_DE@ISO8859-15
2) Use ISO-8859-15 over ISO-8859-1 in European locales when possible
3) Use "UTF-8" over variations like "utf8"
4) Use "ISO8859" over "ISO-8859"

on these last two, Linux is case-insensitive and hyphen-insensitive with
respect to named locales where other systems like BSD have only one
version that must be explicitly used.  Since encoding names are not
standardised, we've picked a lowest common denominator that works.

5) case changes for eucJP
6) convert tests that specified "@euro" modifier to a new ISO_8859 macro
can produces a named locale as a function of system (currently
FreeBSD/DragonFly/NetBSD and everything else but the tailoring is not
limited).  This fixes systems that don't support @euro modifier

There is a lot more work that cant be done to open up libstdc++ locale
tests to non-Linux systems, but given the size of this patch, I wanted
to limit it's scope to only modifying to the name locale specification. 
There are many more modifications that could be made to the test
themselves to make them portable to non-linux systems but I think they
are better made with separate patches.

Andreas Tobler has done a lot of review and testing on both FreeBSD and
linux (to verify no regressions), and Jonathan Wakely has done an
initial review and said it was ready for a broader review now.

Thanks,
John


Attachment: patch-aaa-standard-locales-6.txt
Description: Text document


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