[libcxx-commits] [libcxx] [libc++] Move <features.h> include to <__configuration/platform.h> (PR #205548)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 24 05:52:17 PDT 2026
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/205548
Including `<features.h>` is platform-specific configuration and should therefore be in `<__configuration/platform.h>`.
>From cd51299fb0d5e639f5edc2139a3f8f9ea8f937f3 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Wed, 24 Jun 2026 14:51:11 +0200
Subject: [PATCH] [libc++] Move <features.h> include to
<__configuration/platform.h>
---
libcxx/include/__configuration/platform.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libcxx/include/__configuration/platform.h b/libcxx/include/__configuration/platform.h
index 644fe1724e42e..ebd638e663215 100644
--- a/libcxx/include/__configuration/platform.h
+++ b/libcxx/include/__configuration/platform.h
@@ -30,6 +30,10 @@
// ... add new file formats here ...
#endif
+#if defined(__MVS__)
+# include <features.h> // for __NATIVE_ASCII_F
+#endif
+
// Need to detect which libc we're using if we're on Linux.
#if (defined(__linux__) || defined(__AMDGPU__) || defined(__NVPTX__)) && __has_include(<features.h>)
# include <features.h>
More information about the libcxx-commits
mailing list