public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r9-10053] libstdc++: Rename non-reserved macros in config header [PR103650]
Date: Mon,  9 May 2022 16:39:44 +0000 (GMT)	[thread overview]
Message-ID: <20220509163944.8E9D8385735C@sourceware.org> (raw)

https://gcc.gnu.org/g:de3549eb7bba1af6894b6ad781b6943b16883f2b

commit r9-10053-gde3549eb7bba1af6894b6ad781b6943b16883f2b
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 7958f436242..cb4308365ca 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -1334,6 +1334,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 631c77280b0..e18c771b16b 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -1816,6 +1816,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


                 reply	other threads:[~2022-05-09 16:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220509163944.8E9D8385735C@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).