[gcc r10-10569] libstdc++: Rename non-reserved macros in config header [PR103650]
Jonathan Wakely
redi@gcc.gnu.org
Tue Apr 26 13:12:35 GMT 2022
https://gcc.gnu.org/g:24eb54cc3b564f2bfa6d7e2fa26ddc82c8b2dc18
commit r10-10569-g24eb54cc3b564f2bfa6d7e2fa26ddc82c8b2dc18
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Jan 17 11:24:35 2022 +0000
libstdc++: Rename non-reserved macros in config header [PR103650]
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)
Diff:
---
libstdc++-v3/include/Makefile.am | 2 ++
libstdc++-v3/include/Makefile.in | 2 ++
libstdc++-v3/testsuite/17_intro/headers/c++1998/103650.cc | 13 +++++++++++++
3 files changed, 17 insertions(+)
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index e131ce04f8c..fad5c683824 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -1297,6 +1297,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/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index ae20f6b1d21..1ca4b7be55e 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -1778,6 +1778,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
index 00000000000..356ffa310bc
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/103650.cc
@@ -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
More information about the Gcc-cvs
mailing list