[cfe-commits] [libcxx] r129255 - /libcxx/trunk/include/cerrno

Howard Hinnant hhinnant at apple.com
Sun Apr 10 12:46:56 PDT 2011


Author: hhinnant
Date: Sun Apr 10 14:46:55 2011
New Revision: 129255

URL: http://llvm.org/viewvc/llvm-project?rev=129255&view=rev
Log:
Changes to cerrno to protect against the case the ELAST is not defined.

Modified:
    libcxx/trunk/include/cerrno

Modified: libcxx/trunk/include/cerrno
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/cerrno?rev=129255&r1=129254&r2=129255&view=diff
==============================================================================
--- libcxx/trunk/include/cerrno (original)
+++ libcxx/trunk/include/cerrno Sun Apr 10 14:46:55 2011
@@ -30,25 +30,43 @@
 
 #if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
 
+#ifdef ELAST
+
 const int __elast1 = ELAST+1;
 const int __elast2 = ELAST+2;
-#undef ELAST
+
+#else
+
+const int __elast1 = 104;
+const int __elast2 = 105;
+
+#endif
 
 #ifdef ENOTRECOVERABLE
 
 #define EOWNERDEAD __elast1
+
+#ifdef ELAST
+#undef ELAST
 #define ELAST EOWNERDEAD
+#endif
 
 #elif defined(EOWNERDEAD)
 
 #define ENOTRECOVERABLE __elast1
+#ifdef ELAST
+#undef ELAST
 #define ELAST ENOTRECOVERABLE
+#endif
 
 #else  // defined(EOWNERDEAD)
 
 #define EOWNERDEAD __elast1
 #define ENOTRECOVERABLE __elast2
+#ifdef ELAST
+#undef ELAST
 #define ELAST ENOTRECOVERABLE
+#endif
 
 #endif  // defined(EOWNERDEAD)
 





More information about the cfe-commits mailing list