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++/104883] <system_error> should define all std::errc enumerators Date: Thu, 16 Mar 2023 16:51:13 +0000 [thread overview] Message-ID: <bug-104883-4-odsm9f2t0z@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104883-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104883 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:c86ac1a463f97554b1df9ef8a3e18573ef115e35 commit r11-10578-gc86ac1a463f97554b1df9ef8a3e18573ef115e35 Author: Jonathan Wakely <jwakely@redhat.com> Date: Tue Jan 31 22:16:31 2023 +0000 libstdc++: Fix build failures for avr The avr-libc <errno.h> does not define EOVERFLOW, which means that std::errc::value_too_large is not defined, and so <charconv> cannot be compiled. Define value_too_large for avr with a value that does not clash with any that is defined in <errno.h>. This is a kluge to fix bootstrap for avr; it can be removed after PR libstdc++/104883 is resolved. The avr-libc <errno.h> fails to meet the C and POSIX requirements that each error macro has a distinct integral value, and is usable in #if directives. Add a special case for avr to system_error.cc so that only the valid errors are recognized. Also disable the errno checks in std::filesystem::remove_all that assume a meaningful value for errno. On avr-libc <unistd.h> exists but does not define the POSIX functions needed by std::filesystem, so _GLIBCXX_HAVE_UNISTD_H is not sufficient to check for basic POSIX APIs. Check !defined __AVR__ as well as _GLIBCXX_HAVE_UNISTD_H before using those functions. This is a kluge and we should really have a specific macro that says the required functions are available. libstdc++-v3/ChangeLog: * config/os/generic/error_constants.h (errc::value_too_large) [__AVR__]: Define. * src/c++11/system_error.cc (system_category::default_error_condition) [__AVR__]: Only match recognize values equal to EDOM, ERANGE, ENOSYS and EINTR. * src/c++17/fs_ops.cc (fs::current_path) [__AVR__]: Do not use getcwd. * src/filesystem/ops-common.h [__AVR__]: Do not use POSIX open, close etc. (cherry picked from commit 2d2e163d12f64a5e68f9e0381751ed9d5d6d3617)
prev parent reply other threads:[~2023-03-16 16:51 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-11 15:20 [Bug libstdc++/104883] New: " redi at gcc dot gnu.org 2022-09-22 10:47 ` [Bug libstdc++/104883] " redi at gcc dot gnu.org 2022-09-22 21:59 ` redi at gcc dot gnu.org 2023-02-01 21:07 ` cvs-commit at gcc dot gnu.org 2023-02-01 21:23 ` redi at gcc dot gnu.org 2023-02-02 9:34 ` cvs-commit at gcc dot gnu.org 2023-03-16 16:51 ` cvs-commit at gcc dot gnu.org [this message]
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-104883-4-odsm9f2t0z@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).