]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Horrible macro hacks to allow building on avr
authorJonathan Wakely <jwakely@redhat.com>
Thu, 2 Feb 2023 18:03:26 +0000 (18:03 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 16 Mar 2023 16:23:19 +0000 (16:23 +0000)
commit061700c9f6f0f9f4219ddeb236d55764b42869b6
tree79f64cd6ad5fa9f5c1d2ce2e2f909e77e65f5566
parentf99b97015f16ee3d8d4656666cd7594555fafbf9
libstdc++: Horrible macro hacks to allow building on avr

In r12-4071-g59ffa3e3dba5a7 I added a new __unsupported() function and
replaced all std::filesystem's uses of std::errc::not_supported and
ENOTSUP with a call to that function. Then in r13-5664-g5c43f06c228d16
that function was tweaked to use ENOSYS instead of EOPNOTSUP for avr,
due to limitations of <errno.h> on avr-libc.

In the gcc-11 branch we don't have __unsupported(), so we get loads and
loads of failures when trying to compile the src/c++17/fs_*.cc files.
This horrible hack uses macros to redefine not_supported and ENOTSUP as
function_not_supported and ENOSYS respectively, to fix the build for
avr.

libstdc++-v3/ChangeLog:

* src/c++17/fs_ops.cc [AVR] (not_supported): Define as a macro
for function_not_supported.
* src/filesystem/ops-common.h [AVR] (ENOTSUP): Define as a macro
for ENOSYS.
libstdc++-v3/src/c++17/fs_ops.cc
libstdc++-v3/src/filesystem/ops-common.h
This page took 0.062758 seconds and 6 git commands to generate.