[SystemZ][z/OS] Define _LIBCPP_ELAST
authorMuiez Ahmed <muiez@ibm.com>
Mon, 15 Mar 2021 13:23:36 +0000 (09:23 -0400)
committerMuiez Ahmed <muiez@ibm.com>
Mon, 15 Mar 2021 13:23:36 +0000 (09:23 -0400)
The aim is to define _LIBCPP_ELAST for z/OS libc++ since strerror/strerror_r can't handle out-of-range errno values.

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

libcxx/src/include/config_elast.h

index 3113f9f..366292b 100644 (file)
@@ -35,6 +35,8 @@
 // No _LIBCPP_ELAST needed on Apple
 #elif defined(__sun__)
 #define _LIBCPP_ELAST ESTALE
+#elif defined(__MVS__)
+#define _LIBCPP_ELAST 1160
 #elif defined(_LIBCPP_MSVCRT_LIKE)
 #define _LIBCPP_ELAST (_sys_nerr - 1)
 #else