[libcxx-commits] [libcxx] [libcxx] No _LIBCPP_ELAST needed for LLVM libc (PR #108739)

Petr Hosek via libcxx-commits libcxx-commits at lists.llvm.org
Sun Sep 15 00:37:50 PDT 2024


https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/108739

LLVM libc can handle out-of-range errno values.

>From 00f8bec11fb950d00ec7040d4fdbe3faa50b24aa Mon Sep 17 00:00:00 2001
From: Petr Hosek <phosek at google.com>
Date: Sun, 15 Sep 2024 00:36:22 -0700
Subject: [PATCH] [libcxx] No _LIBCPP_ELAST needed for LLVM libc

LLVM libc can handle out-of-range errno values.
---
 libcxx/src/include/config_elast.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libcxx/src/include/config_elast.h b/libcxx/src/include/config_elast.h
index 899e124ad261b2..158b93e20040dd 100644
--- a/libcxx/src/include/config_elast.h
+++ b/libcxx/src/include/config_elast.h
@@ -21,6 +21,8 @@
 // where strerror/strerror_r can't handle out-of-range errno values.
 #if defined(ELAST)
 #  define _LIBCPP_ELAST ELAST
+#elif defined(__LLVM_LIBC__)
+// No _LIBCPP_ELAST needed for LLVM libc
 #elif defined(_NEWLIB_VERSION)
 #  define _LIBCPP_ELAST __ELASTERROR
 #elif defined(__NuttX__)



More information about the libcxx-commits mailing list