Created
August 26, 2014 21:36
-
-
Save jroelofs/5512c108d1027c6d5022 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit c77d06fe25dbaf137083db2eb2a590ea5f72d4c9 | |
Author: Jonathan Roelofs <jonathan@codesourcery.com> | |
Date: Thu Aug 14 11:38:18 2014 -0600 | |
[libcxx] Fix diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp | |
diff --git a/libcxx/src/system_error.cpp b/libcxx/src/system_error.cpp | |
index d5cb2d4..96a9736 100644 | |
--- a/libcxx/src/system_error.cpp | |
+++ b/libcxx/src/system_error.cpp | |
@@ -71,6 +71,9 @@ __generic_error_category::message(int ev) const | |
#elif defined(__linux__) | |
if (ev > 4095) | |
return string("unspecified generic_category error"); | |
+#elif defined(_NEWLIB_VERSION) && defined(__ELASTERROR) | |
+ if (ev > __ELASTERROR) | |
+ return string("unspecified generic_category error"); | |
#endif // ELAST | |
return __do_message::message(ev); | |
} | |
@@ -106,6 +109,9 @@ __system_error_category::message(int ev) const | |
#elif defined(__linux__) | |
if (ev > 4095) | |
return string("unspecified system_category error"); | |
+#elif defined(_NEWLIB_VERSION) && defined(__ELASTERROR) | |
+ if (ev > __ELASTERROR) | |
+ return string("unspecified system_category error"); | |
#endif // ELAST | |
return __do_message::message(ev); | |
} | |
@@ -119,6 +125,9 @@ __system_error_category::default_error_condition(int ev) const _NOEXCEPT | |
#elif defined(__linux__) | |
if (ev > 4095) | |
return error_condition(ev, system_category()); | |
+#elif defined(_NEWLIB_VERSION) && defined(__ELASTERROR) | |
+ if (ev > __ELASTERROR) | |
+ return error_condition(ev, system_category()); | |
#endif // ELAST | |
return error_condition(ev, generic_category()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment