Reorganize _LIBCPP_LOCALE__L_EXTENSIONS
authorBen Craig <ben.craig@codeaurora.org>
Wed, 9 Mar 2016 15:39:39 +0000 (15:39 +0000)
committerBen Craig <ben.craig@codeaurora.org>
Wed, 9 Mar 2016 15:39:39 +0000 (15:39 +0000)
commitd2f15ba3a1a23e69f2938364f006170f2ee783c7
treefb86f5f9d92f22e2b557a490328747d533d55880
parentbf17ecf59a9bdfe00a5cb25fe59c9617f42ca79d
Reorganize _LIBCPP_LOCALE__L_EXTENSIONS

Instead of checking _LIBCPP_LOCALE_L_EXTENSIONS all over, instead check it
once, and define the various *_l symbols once. The private redirector symbol
names are all prefixed with _libcpp_* so that they won't conflict with user
symbols, and so they won't conflict with future C library symbols. In
particular, glibc likes providing private symbols such as __locale_t, so we
should follow a different naming pattern (like _libcpp_*) to avoid problems
on that front.

Tested on Linux with glibc. Hoping for the best on OSX and the various BSDs.

http://reviews.llvm.org/D17456

llvm-svn: 263016
libcxx/include/__bsd_locale_defaults.h [new file with mode: 0644]
libcxx/include/__bsd_locale_fallbacks.h [new file with mode: 0644]
libcxx/include/locale
libcxx/src/locale.cpp