diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-12-31 21:24:04 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-12-31 21:24:04 +0000 |
commit | c8bf96182dc24439a097d24b158d1901eedf077a (patch) | |
tree | bb704193cedd4c77f1f814cf93f9f07125f107ec | |
parent | 5865d12e9fb54a55421e31bcfad0f3d5435d87fb (diff) | |
download | bcm5719-llvm-c8bf96182dc24439a097d24b158d1901eedf077a.tar.gz bcm5719-llvm-c8bf96182dc24439a097d24b158d1901eedf077a.zip |
system_error: use strerror_r only for threaded code
When building libc++ without threading, strerror_r is not used. Define
the code only when threading is enabled. This allows us to build
system_error for Windows, which ATM doesn't build with threading.
llvm-svn: 290791
-rw-r--r-- | libcxx/src/system_error.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxx/src/system_error.cpp b/libcxx/src/system_error.cpp index 926f6f1c1f0..3a2255425f0 100644 --- a/libcxx/src/system_error.cpp +++ b/libcxx/src/system_error.cpp @@ -55,6 +55,7 @@ error_category::equivalent(const error_code& code, int condition) const _NOEXCEP return *this == code.category() && code.value() == condition; } +#if !defined(_LIBCPP_HAS_NO_THREADS) namespace { // GLIBC also uses 1024 as the maximum buffer size internally. @@ -96,6 +97,7 @@ string do_strerror_r(int ev) { #endif } // end namespace +#endif string __do_message::message(int ev) const |