llvm-project/libcxx/test/std
Ed Schouten e0cf3b9a3c Make support for thread-unsafe C functions optional.
One of the aspects of CloudABI is that it aims to help you write code
that is thread-safe out of the box. This is very important if you want
to write libraries that are easy to reuse. For CloudABI we decided to
not provide the thread-unsafe functions. So far this is working out
pretty well, as thread-unsafety issues are detected really early on.

The following patch adds a knob to libc++,
_LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS, that can be set to disable
thread-unsafe functions that can easily be avoided in practice. The
following functions are not thread-safe:

- <clocale>: locale handles should be preferred over setlocale().
- <cstdlib>: mbrlen(), mbrtowc() and wcrtomb() should be preferred over
  their non-restartable counterparts.
- <ctime>: asctime(), ctime(), gmtime() and localtime() are not
  thread-safe. The first two are also deprecated by POSIX.

Differential Revision:	http://reviews.llvm.org/D8703
Reviewed by:	marshall

llvm-svn: 240527
2015-06-24 08:44:38 +00:00
..
algorithms Fix for LWG Issue 2369: constexpr max(initializer_list) vs max_element 2015-05-10 13:53:31 +00:00
atomics Fix uninitialized values and bad enum conversions found by UBSAN. 2015-05-19 23:03:57 +00:00
containers Fix PR#23767. Add tests for iterator invalidation for deque::erase/pop_front/pop_back 2015-06-05 22:34:19 +00:00
depr Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
diagnostics libc++ implements its' hash objects as deriving from std::unary_function, and the tests test for that. STL @ MS pointed out that the standard doesn't requie these objects to derive from unary_function, and so the tests should not require that either. Change the tests to check for the embedded typedefs - which ARE required. No change to the library. 2015-01-07 21:53:23 +00:00
experimental Implement std::experimental::sample. 2015-05-13 16:55:41 +00:00
extensions Fix more issues exposed by -pedantic-errors in c++03 mode 2015-02-10 17:20:18 +00:00
input.output Make seeking on an ostream that has eofbit set work correctly. Fixes PR#21361 2015-06-22 15:01:21 +00:00
iterators A few bits of N2994 didn't get fully implemented a long time ago. Thanks to STL@microsoft.com for the bug report 2015-04-16 21:36:54 +00:00
language.support Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
localization Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
numerics Remove unneeded initialisation of fenv_t and fexcept_t. 2015-03-15 18:36:31 +00:00
re Add code to honor the match_not_bol and match_not_eol regex flats. Fixes PR#22651. Thanks to Jim Porter for the report and suggested fix. 2015-03-19 17:05:59 +00:00
strings Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
thread LWG2442: call_once() shouldn't DECAY_COPY(). Patch from K-Ballo. 2015-06-13 02:23:00 +00:00
utilities Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
nothing_to_do.pass.cpp