From ff3343518ae6e1aa1efe7fe02a6a4c6cb24f3b62 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 20 Mar 2025 18:47:33 +0000 Subject: [PATCH] libstdc++: Fix std.compat exports of and MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit libstdc++-v3/ChangeLog: * src/c++23/std.compat.cc.in: Only export and contents for C++26 and later. Reviewed-by: Tomasz Kamiński --- libstdc++-v3/src/c++23/std.compat.cc.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/src/c++23/std.compat.cc.in b/libstdc++-v3/src/c++23/std.compat.cc.in index ba7ed0312ab..344502195b1 100644 --- a/libstdc++-v3/src/c++23/std.compat.cc.in +++ b/libstdc++-v3/src/c++23/std.compat.cc.in @@ -21,11 +21,15 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -export module std.compat; -export import std; +module; #include +#include + +export module std.compat; +export import std; +#ifdef __STDC_VERSION_STDBIT_H__ // export { @@ -52,7 +56,9 @@ _GLIBCXX_STDBIT_FUNC(stdc_bit_floor); _GLIBCXX_STDBIT_FUNC(stdc_bit_ceil); #undef _GLIBCXX_STDBIT_FUNC } +#endif +#ifdef __STDC_VERSION_STDCKDINT_H__ // export { @@ -60,6 +66,7 @@ export using __gnu_cxx::ckd_sub; using __gnu_cxx::ckd_mul; } +#endif #define STD_COMPAT 1 -- 2.47.2