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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290791 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -55,6 +55,7 @@ error_category::equivalent(const error_code& code, int condition) const _NOEXCEP
|
|||||||
return *this == code.category() && code.value() == condition;
|
return *this == code.category() && code.value() == condition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(_LIBCPP_HAS_NO_THREADS)
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// GLIBC also uses 1024 as the maximum buffer size internally.
|
// GLIBC also uses 1024 as the maximum buffer size internally.
|
||||||
@@ -96,6 +97,7 @@ string do_strerror_r(int ev) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // end namespace
|
} // end namespace
|
||||||
|
#endif
|
||||||
|
|
||||||
string
|
string
|
||||||
__do_message::message(int ev) const
|
__do_message::message(int ev) const
|
||||||
|
|||||||
Reference in New Issue
Block a user