[PATCH] D17416: [libcxx] Reorganize locale extension fallbacks

Ben Craig via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 18 14:32:11 PST 2016


bcraig created this revision.
bcraig added reviewers: jroelofs, danalbert, mclow.lists.
bcraig added a subscriber: cfe-commits.
Herald added subscribers: srhines, danalbert, tberghammer, jfb.

This is one part of many of a locale refactor. See http://reviews.llvm.org/D17146 for an idea of where this is going.

The various _l locale extension functions originate from very different places.  Some come from POSIX, some are BSD extensions, and some are shared BSD and GLIBC extensions.  This patch tries to group the local extension reimplementations by source.  This should make it easier to make libcxx work with POSIX compliant C libraries that lack these extensions.

The fallback locale functions are also useful on their own for other lightweight platforms. Putting these fallback implementations in support/xlocale should enable code sharing.

I have no access to a newlib system or an android system to build and test with.  I _do_ have access to a system without any of the _l locale extensions though, and I was able to ensure that the new __posix_l_fallback.h and __strtonum_fallback.h didn't have any massive problems.


http://reviews.llvm.org/D17416

Files:
  include/support/android/locale_bionic.h
  include/support/newlib/xlocale.h
  include/support/xlocale/__posix_l_fallback.h
  include/support/xlocale/__strtonum_fallback.h
  include/support/xlocale/xlocale.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17416.48403.patch
Type: text/x-patch
Size: 12535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160218/114ef5d0/attachment.bin>


More information about the cfe-commits mailing list