Similar to r16-4034-g1953939243e1ab, this comments out another macro
that Autoconf adds to the generated config.h but which is not wanted in
the c++config.h file that we install.

There's no benefit to defining _GLIBCXX_STDC_HEADERS in user code, so we
should just prevent it from being defined.

libstdc++-v3/ChangeLog:

        PR libstdc++/79147
        PR libstdc++/103650
        * include/Makefile.am (c++config.h): Adjust sed command to
        comment out STDC_HEADERS macro.
        * include/Makefile.in: Regenerate.
---

Tested powerpc64le-linux.

 libstdc++-v3/include/Makefile.am | 2 +-
 libstdc++-v3/include/Makefile.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index d1e5c3d84918..ae7a7ca9073a 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -1424,7 +1424,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
            -e '/PACKAGE/!s/VERSION/_GLIBCXX_VERSION/g' \
            -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
            -e 's/LT_OBJDIR/_GLIBCXX_LT_OBJDIR/g' \
-           -e 's/STDC_HEADERS/_GLIBCXX_STDC_HEADERS/g' \
+           -e 's,^#.*STDC_HEADERS,// &,' \
            -e 's/_DARWIN_USE_64_BIT_INODE/_GLIBCXX_DARWIN_USE_64_BIT_INODE/g' \
            -e 's/_FILE_OFFSET_BITS/_GLIBCXX_FILE_OFFSET_BITS/g' \
            -e 's/_LARGE_FILES/_GLIBCXX_LARGE_FILES/g' \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 13c0b5b4f839..133984784cd5 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -1901,7 +1901,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
            -e '/PACKAGE/!s/VERSION/_GLIBCXX_VERSION/g' \
            -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
            -e 's/LT_OBJDIR/_GLIBCXX_LT_OBJDIR/g' \
-           -e 's/STDC_HEADERS/_GLIBCXX_STDC_HEADERS/g' \
+           -e 's,^#.*STDC_HEADERS,// &,' \
            -e 's/_DARWIN_USE_64_BIT_INODE/_GLIBCXX_DARWIN_USE_64_BIT_INODE/g' \
            -e 's/_FILE_OFFSET_BITS/_GLIBCXX_FILE_OFFSET_BITS/g' \
            -e 's/_LARGE_FILES/_GLIBCXX_LARGE_FILES/g' \
-- 
2.51.0

Reply via email to