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.