diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-22 18:59:50 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-22 18:59:50 +0000 |
| commit | 540d2a8bf1f622cb7ee8d16e19fb113c15523794 (patch) | |
| tree | 7e386f51b72ff5e4d07612d225ae99d3baa01639 /contrib/libc++/src/system_error.cpp | |
| parent | 289fa303d6df65b9db955e478263677f8bc7e62a (diff) | |
| parent | 1c3313bd0215c89fb38710a1ea0762ccf32e859c (diff) | |
Notes
Diffstat (limited to 'contrib/libc++/src/system_error.cpp')
| -rw-r--r-- | contrib/libc++/src/system_error.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/libc++/src/system_error.cpp b/contrib/libc++/src/system_error.cpp index c54712476828..cbbbb5dcd15c 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 { } @@ -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(); |
