Add explicit casts to unsigned char before calling ctype functions.
Fixes the value range on platforms with signed char.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180940 91177308-0d34-0410-b5e6-96231b3b80d8
Make it possible to provide special (linker) flags for the thread tests.
Use it to build & link against libpthread on NetBSD for tests iff they
are testing the thread interface.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180942 91177308-0d34-0410-b5e6-96231b3b80d8
The push/pop variant of pragma GCC diagnostic is only supported by Clang
and GCC 4.6 and newer, so protect accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180943 91177308-0d34-0410-b5e6-96231b3b80d8
Stephan Tolksdorf: fixes the issue in the <atomic> header and adds corresponding tests. I've used macros to fall back to a user-provided default constructor if _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS (though I suspect that there won't be many users defining that macro).

The tests use placement new to check that atomic values get properly zero-initialized. I had to modify the atomic_is_lock_free test, because default initialization of an object of const type 'const A' (aka 'const atomic<int>') requires a user-provided default constructor.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180945 91177308-0d34-0410-b5e6-96231b3b80d8