[libcxx-commits] [libcxx] [libcxx] Do not warn on missing `ELAST` definition on LLVM libc (PR #109205)

Joseph Huber via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 18 14:53:21 PDT 2024


https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/109205

Summary:
The LLVM C library shouldn't need this `ELAST` definition because our
implementation should handle out-of-range error values gracefully.


>From e10b9bc77acc6fb0b5b463d2a40e9c6da101adff Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Wed, 18 Sep 2024 16:51:35 -0500
Subject: [PATCH] [libcxx] Do not warn on missing `ELAST` definition on LLVM
 libc

Summary:
The LLVM C library shouldn't need this `ELAST` definition because our
implementation should handle out-of-range error values gracefully.
---
 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..28fc9ca938a377 100644
--- a/libcxx/src/include/config_elast.h
+++ b/libcxx/src/include/config_elast.h
@@ -31,6 +31,8 @@
 // No _LIBCPP_ELAST needed on WASI
 #elif defined(__EMSCRIPTEN__)
 // No _LIBCPP_ELAST needed on Emscripten
+#elif defined(__LLVM_LIBC__)
+// No _LIBCPP_ELAST needed on LLVM's libc.
 #elif defined(__linux__) || defined(_LIBCPP_HAS_MUSL_LIBC)
 #  define _LIBCPP_ELAST 4095
 #elif defined(__APPLE__)



More information about the libcxx-commits mailing list