[PATCH] Newlib names ELAST differently than linux

Dan Albert danalbert at google.com
Fri Aug 29 08:27:24 PDT 2014


================
Comment at: src/ios.cpp:56
@@ -54,6 +55,3 @@
     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
----------------
Could also define _LIBCPP_ELAST to a large dummy value that would make the second half of the conditional always true and get rid of all the pesky ifdefs. Up to you. I'm happy with the patch now.

http://reviews.llvm.org/D5079






More information about the cfe-commits mailing list