[patch][libstdc++] Provide nearly complete locale support for DragonFly
Jonathan Wakely
jwakely@redhat.com
Thu Aug 27 12:26:00 GMT 2015
On 13/08/15 15:13 +0200, John Marino wrote:
>On 7/31/2015 6:06 PM, John Marino wrote:
>> So far, DragonFly only handles the C/POSIX locale through the "generic"
>> locale support files, similar to FreeBSD and Darwin. The following
>> patchset enables nearly complete support for named locales. The except
>> is for std:messages which requires gettext support in libc which is not
>> present in any *BSD. For that category, I have left generic support in
>> place at Jonathan's recommendation.
>>
>> The support was made by talking the GNU version and adapting it to work
>> on DragonFly.
>>
>> Testing has shown these patches to be working. A "before" test results:
>> https://gcc.gnu.org/ml/gcc-testresults/2015-07/msg01678.html
>> PASS: 9883
>> FAIL: 89
>> XSUCC: 1
>> XFAIL: 66
>> UNSUP: 465
>> The most recent test:
>> https://gcc.gnu.org/ml/gcc-testresults/2015-07/msg03024.html
>> PASS: 10074
>> FAIL: 32
>> XFAIL: 68
>> UNSUP: 401
>>
>> For full disclosure, a number of improvements were made to the OS in the
>> area of locales, such as DragonFly being the first BSD to acquire full
>> collation support.
>>
>> Most of the remaining failures are due to differences in locale
>> definitions between linux and DragonFly (DragonFly now uses CLDR POSIX
>> definitions, v2.0.1 currently)
>>
>> Attachments:
>> 1. combined diff
>> 2. diff between gnu and dragonfly version (FYI)
>> 3. Suggested Changelog entry
>>
>> This work should be highly interesting for FreeBSD and perhaps darwin as
>> well. FreeBSD may be able to switch to it directly without any required
>> modifications, but of course that must be tested.
>>
>> There is no risk to approving this patchset because it affects only
>> DragonFly. Please consider approving this for incorporating into trunk
>> (also recall that my FSF copyright assignment is filed and in order.)
>>
N.B. please CC the libstdc++ list on all libstdc++ patches.
The tests on DragonFly look excellent now, nice work.
>
>I'd like to ping the original post
>(https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02678.html )
>and also provide a 2-line revision of the patch set.
>
>The first line adds "#include <xlocale.h>" to bits/c++locale.h which is
>needed for the locale_t type definition.
>
>The second change adds "#define _GLIBCXX_USE_C99 1" to dragonfly's
>os_defines.h. We copied FreeBSD's configuration, but FreeBSD doesn't
>yet support C99 so it wasn't set there. It fixes several regressions we
>found after using GCC a bit.
I think that should probably be defined on FreeBSD too now, so that
the _GLIBCXX_USE_C99_DYNAMIC checks come into effect.
>How does this attached patchset look?
>I had to add one line to the suggested Changelog entry for os_defines.h
Committed to trunk with only minor changes to remove some trailing
whitespace in config/os/bsd/dragonfly/ctype_configure_char.cc and to
capitalize a couple of ChangeLog lines.
Thanks for the ongoing improvements to DragonFly support.
More information about the Libstdc++
mailing list