]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Rename non-reserved macros in config header [PR103650]
authorJonathan Wakely <jwakely@redhat.com>
Mon, 17 Jan 2022 11:24:35 +0000 (11:24 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 4 Apr 2022 11:45:29 +0000 (12:45 +0100)
libstdc++-v3/ChangeLog:

PR libstdc++/103650
* include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
* include/Makefile.in: Regenerate.
* testsuite/17_intro/headers/c++1998/103650.cc: New test.

(cherry picked from commit fa092570fbaf3bb4202e518eb8beba146c464d9f)

libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/testsuite/17_intro/headers/c++1998/103650.cc [new file with mode: 0644]

index 40a41ef2a1c24c6fc73cb97603e038f07f588282..174fafeee5ea72849eca3d494005ad06cd31dd24 100644 (file)
@@ -1329,6 +1329,8 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
            -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
            -e '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/_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' \
index fcd2b5b2d40cacb24dcd48f43b5a257af33ba9a4..814b0a43b3d51deb98e80303c4f1a80a32701e3c 100644 (file)
@@ -1815,6 +1815,8 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
            -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
            -e '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/_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/testsuite/17_intro/headers/c++1998/103650.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/103650.cc
new file mode 100644 (file)
index 0000000..356ffa3
--- /dev/null
@@ -0,0 +1,13 @@
+// { dg-do preprocess }
+
+// PR libstdc++/103650 libstdc++ headers defined LT_OBJDIR and STDC_HEADERS
+
+#define LT_OBJDIR 99
+#define STDC_HEADERS 99
+#include <utility>
+#if LT_OBJDIR != 99
+# error LT_OBJDIR redefined
+#endif
+#if STDC_HEADERS != 99
+# error STDC_HEADERS redefined
+#endif