summaryrefslogtreecommitdiffstats
path: root/libcxx/include/cstdlib
diff options
context:
space:
mode:
authorEd Schouten <ed@nuxi.nl>2016-12-30 10:44:00 +0000
committerEd Schouten <ed@nuxi.nl>2016-12-30 10:44:00 +0000
commit0a92402436d04d86eddc2209a6eb6f0186155ecb (patch)
tree4506f97efed598e3fbe425662e67e2d87f821956 /libcxx/include/cstdlib
parent72bcc049f2b2ed75fd74178b8b303768fdc85082 (diff)
downloadbcm5719-llvm-0a92402436d04d86eddc2209a6eb6f0186155ecb.tar.gz
bcm5719-llvm-0a92402436d04d86eddc2209a6eb6f0186155ecb.zip
Remove mblen(), mbtowc() and wctomb() from the thread-unsafe functions.
Back in r240527 I added a knob to prevent thread-unsafe functions from being exposed. mblen(), mbtowc() and wctomb() were also added to this list, as the latest issue of POSIX doesn't require these functions to be thread-safe. It turns out that the only circumstance in which these functions are not thread-safe is in case they are used in combination with state-dependent character sets (e.g., Shift-JIS). According to Austin Group Bug 708, these character sets "[...] are mostly a relic of the past and which were never supported on most POSIX systems". Though in many cases the use of these functions can be prevented by using the reentrant counterparts, they are the only functions that allow you to query whether the locale's character set is state-dependent. This means that omitting these functions removes actual functionality. Let's be a bit less pedantic and drop the guards around these functions. Links: http://austingroupbugs.net/view.php?id=708 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2037.htm Reviewed by: ericwf Differential Revision: https://reviews.llvm.org/D21436 llvm-svn: 290748
Diffstat (limited to 'libcxx/include/cstdlib')
-rw-r--r--libcxx/include/cstdlib2
1 files changed, 0 insertions, 2 deletions
diff --git a/libcxx/include/cstdlib b/libcxx/include/cstdlib
index 9a775b84484..2ca25ed56ca 100644
--- a/libcxx/include/cstdlib
+++ b/libcxx/include/cstdlib
@@ -144,11 +144,9 @@ using ::ldiv;
#ifndef _LIBCPP_HAS_NO_LONG_LONG
using ::lldiv;
#endif // _LIBCPP_HAS_NO_LONG_LONG
-#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
using ::mblen;
using ::mbtowc;
using ::wctomb;
-#endif
using ::mbstowcs;
using ::wcstombs;
#ifdef _LIBCPP_HAS_QUICK_EXIT
OpenPOWER on IntegriCloud