gcc50: Change c++ locale handling

Operating Systems / DragonFlyBSD - John Marino [marino.st] - 18 July 2015 17:30 UTC

The biggest change is removing the modification of the specified locale. Before locales without extensions were appended with ".UTF-8" and modifiers (e.g. @euro) were silently stripped off.

The latter is probably a bad idea, and even if we want to continue doing this (modifiers are not supported), it should be done at the library level, not at c++ on gcc level. The no-extension problem has been solved today by creating symlinks at /usr/share/locale.

The logic of the "gnu" support was mimicked by using newlocale, duplocale, and freelocale. The generic version uses setlocale only. This patch will be pushed upstream most likely.

75978a6 gcc50: Change c++ locale handling
contrib/gcc-5.0/README.DRAGONFLY | 1 +
.../config/locale/dragonfly/c_locale.cc | 67 ++++++++------------
2 files changed, 27 insertions(+), 41 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share