[libc++][AIX] Define _LIBCPP_ELAST
authorjasonliu <jasonliu.development@gmail.com>
Mon, 10 May 2021 13:45:36 +0000 (13:45 +0000)
committerjasonliu <jasonliu.development@gmail.com>
Mon, 10 May 2021 13:54:30 +0000 (13:54 +0000)
The aim is to define _LIBCPP_ELAST for AIX since strerror/strerror_r
can't handle out-of-range errno values.

Differential Revision: https://reviews.llvm.org/D100986

libcxx/src/include/config_elast.h

index 366292b..7880c73 100644 (file)
@@ -39,6 +39,8 @@
 #define _LIBCPP_ELAST 1160
 #elif defined(_LIBCPP_MSVCRT_LIKE)
 #define _LIBCPP_ELAST (_sys_nerr - 1)
+#elif defined(_AIX)
+#define _LIBCPP_ELAST 127
 #else
 // Warn here so that the person doing the libcxx port has an easier time:
 #warning ELAST for this platform not yet implemented