From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [committed] libstdc++: Test errno macros directly, not via autoconf [PR 93151]
Date: Thu, 17 Dec 2020 14:05:31 +0000 [thread overview]
Message-ID: <20201217140531.GY2309743@redhat.com> (raw)
In-Reply-To: <20201216133809.GA1029023@redhat.com>
On 16/12/20 13:38 +0000, Jonathan Wakely wrote:
>This fixes a bug caused by a mismatch between the macros defined by
><errno.h> when GCC is built and the macros defined by <errno.h> when
>users include <system_error>. If the user code is compiled with
>_XOPEN_SOURCE defined to 500 or 600, Darwin suppresses the
>ENOTRECOVERABLE and EOWNERDEAD macros, which are not defined by SUSv3
>(aka POSIX.1-2001).
>
>Since POSIX requires the errno macros to be macros (and not variables or
>enumerators) we can just test for them directly using the preprocessor.
>That means that <system_error> will match what is actuallydefined when
>it's included, not what was defined when GCC was built. With that change
>there is no need for the GLIBCXX_CHECK_SYSTEM_ERROR configure checks and
>they can be removed.
>
>libstdc++-v3/ChangeLog:
>
> PR libstdc++/93151
> * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Remove.
> * configure.ac: Regenerate.
Oops, that changelog was wrong.
> * config/os/generic/error_constants.h: Test POSIX errno macros
> directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
> * testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
> Likewise.
> * testsuite/19_diagnostics/headers/system_error/93151.cc: New
> test.
I forgot to regenerate the autoconf files. Fixed in r11-6229.
Tested powerpc64le-linux. Committed to trunk.
libstdc++-v3/ChangeLog:
* config.h.in: Regenerate.
* configure: Regenerate.
next prev parent reply other threads:[~2020-12-17 14:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 13:38 Jonathan Wakely
2020-12-17 14:05 ` Jonathan Wakely [this message]
2020-12-17 16:21 ` Jonathan Wakely
2021-04-01 14:04 ` Eric Botcazou
2021-04-01 14:25 ` Jonathan Wakely
2021-04-01 14:27 ` Jakub Jelinek
2021-04-01 15:15 ` Jonathan Wakely
2021-04-01 16:47 ` Eric Botcazou
2021-04-01 17:51 ` Jonathan Wakely
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=20201217140531.GY2309743@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@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).