public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/93151] system_error header fails to compile with -D_XOPEN_SOURCE=600 Date: Wed, 16 Dec 2020 13:36:56 +0000 [thread overview] Message-ID: <bug-93151-4-JbxEjiPFEP@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-93151-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93151 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:a2c2eec183acf25c9b214fa0827718e4d2fdfc93 commit r11-6137-ga2c2eec183acf25c9b214fa0827718e4d2fdfc93 Author: Jonathan Wakely <jwakely@redhat.com> Date: Tue Dec 15 20:28:11 2020 +0000 libstdc++: Test errno macros directly, not via autoconf [PR 93151] 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. * 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.
next prev parent reply other threads:[~2020-12-16 13:36 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-93151-4@http.gcc.gnu.org/bugzilla/> 2020-12-14 16:39 ` redi at gcc dot gnu.org 2020-12-16 13:36 ` cvs-commit at gcc dot gnu.org [this message] 2020-12-16 13:52 ` redi at gcc dot gnu.org 2021-03-29 20:01 ` cvs-commit at gcc dot gnu.org 2021-03-29 20:04 ` redi at gcc dot gnu.org 2021-04-19 10:40 ` redi at gcc dot gnu.org 2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org 2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org
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=bug-93151-4-JbxEjiPFEP@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).