Newlib names ELAST differently than linux
llvm-svn: 216943
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: a409d59cf5847b1296fc881887bc219abc3f6a32
diff --git a/src/ios.cpp b/src/ios.cpp
index 260ec76..b71d7da 100644
--- a/src/ios.cpp
+++ b/src/ios.cpp
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "__config"
#include "ios"
#include "streambuf"
#include "istream"
@@ -52,11 +53,9 @@
__iostream_category::message(int ev) const
{
if (ev != static_cast<int>(io_errc::stream)
-#ifdef ELAST
- && ev <= ELAST
-#elif defined(__linux__)
- && ev <= 4095
-#endif // ELAST
+#ifdef _LIBCPP_ELAST
+ && ev <= _LIBCPP_ELAST
+#endif // _LIBCPP_ELAST
)
return __do_message::message(ev);
return string("unspecified iostream_category error");