]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Use ENOSYS for unsupported filesystem ops on AVR
authorJonathan Wakely <jwakely@redhat.com>
Thu, 2 Feb 2023 16:00:21 +0000 (16:00 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 3 Oct 2023 15:28:20 +0000 (16:28 +0100)
commit7d6bfe901594b59d8ee5bd6d841f623a90e9b2d1
tree1a4c47fc520e23d804979560ca09171c24b36bd5
parent6aa157e6ece28c3963607dbb5849b532824c9c5c
libstdc++: Use ENOSYS for unsupported filesystem ops on AVR

Because avr-libc <errno.h> defines most error numbers with duplicate
values it's not sufficient to check #ifdef ENOTSUP when deciding which
std::errc constant to use for the filesystem library's __unsupported()
helper. Add a special case for AVR to always use the ENOSYS value.

libstdc++-v3/ChangeLog:

* src/filesystem/ops-common.h [AVR] (__unsupported): Always use
errc::function_not_supported instead of errc::not_supported.

(cherry picked from commit 5c43f06c228d169c370e99fa009154344fa305b8)
libstdc++-v3/src/filesystem/ops-common.h