diff options
author | Luiz Souza <luiz@netgate.com> | 2018-02-23 15:11:28 -0300 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2018-02-23 15:11:28 -0300 |
commit | 71bc802f753a5002d2eca6913c7bfdfc138fb250 (patch) | |
tree | 84747d5dde9a24c682ae80a88adc1e77b474e6e1 /contrib/libc++/src/system_error.cpp | |
parent | 94c2674aef48e20e0cf8e83e94102eee0f09b9fe (diff) | |
parent | ee49d4c5a19918b9960cffdf0460a5cab9989625 (diff) | |
download | FreeBSD-src-71bc802f753a5002d2eca6913c7bfdfc138fb250.zip FreeBSD-src-71bc802f753a5002d2eca6913c7bfdfc138fb250.tar.gz |
Merge remote-tracking branch 'origin/RELENG_2_4-meltdown' into RELENG_2_4
Diffstat (limited to 'contrib/libc++/src/system_error.cpp')
-rw-r--r-- | contrib/libc++/src/system_error.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/libc++/src/system_error.cpp b/contrib/libc++/src/system_error.cpp index c547124..17f2c9a 100644 --- a/contrib/libc++/src/system_error.cpp +++ b/contrib/libc++/src/system_error.cpp @@ -17,9 +17,9 @@ #include "cstring" #include "cstdio" #include "cstdlib" -#include "cassert" #include "string" #include "string.h" +#include "__debug" #if defined(__ANDROID__) #include <android/api-level.h> @@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD // class error_category -#if defined(_LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR) +#if defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS) error_category::error_category() _NOEXCEPT { } @@ -65,7 +65,7 @@ constexpr size_t strerror_buff_size = 1024; string do_strerror_r(int ev); -#if defined(_LIBCPP_MSVCRT) +#if defined(_LIBCPP_MSVCRT_LIKE) string do_strerror_r(int ev) { char buffer[strerror_buff_size]; if (::strerror_s(buffer, strerror_buff_size, ev) == 0) @@ -96,7 +96,7 @@ string do_strerror_r(int ev) { std::snprintf(buffer, strerror_buff_size, "Unknown error %d", ev); return string(buffer); } else { - assert(new_errno == ERANGE); + _LIBCPP_ASSERT(new_errno == ERANGE, "unexpected error from ::strerr_r"); // FIXME maybe? 'strerror_buff_size' is likely to exceed the // maximum error size so ERANGE shouldn't be returned. std::abort(); |