llvm-project/libcxx
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
..
cmake Fix building and testing libc++ with GCC. 2015-05-20 03:15:01 +00:00
include Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
lib [libcxx] Add code coverage configuration to CMake and LIT. 2015-03-31 04:15:45 +00:00
src When building libc++, we use '"' as a delimiter instead of '<' when including libc++ header files. This is so that the dylib gets built with our headers; rather than the system-installed ones. We do this in most places already, just fixing a couple of inconsistent uses. 2015-06-23 14:45:02 +00:00
test Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
utils cleanup comments in sym_check 2015-03-27 06:04:37 +00:00
www Mark a couple of features as 'in progress' 2015-06-23 20:48:55 +00:00
.arcconfig Update Arcanist config to point to reviews.llvm.org 2014-06-10 18:29:36 +00:00
.gitignore [libc++] Refactor test components into modules. 2015-01-09 18:03:29 +00:00
CMakeLists.txt Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
CREDITS.TXT Add self to CREDITS.txt 2015-02-26 00:48:22 +00:00
LICENSE.TXT Update copyright year to 2015. 2015-03-12 20:13:11 +00:00
Makefile Revert "Fix installheaders target's permissions" 2014-12-16 05:28:07 +00:00
TODO.TXT Cleanup result_of tests and fix issues with the C++03 result_of. 2015-06-13 08:25:24 +00:00