From: Jonathan Wakely Date: Sat, 16 Dec 2023 23:51:09 +0000 (+0000) Subject: libstdc++: Fix bootstrap on AIX due to fileno macro X-Git-Tag: basepoints/gcc-15~3502 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f7acbf04296e4d2553570642d7290d56b99228f;p=thirdparty%2Fgcc.git libstdc++: Fix bootstrap on AIX due to fileno macro On AIX fileno is a function-like macro, so enclose the name in parentheses to ensure we use the real function. libstdc++-v3/ChangeLog: * src/c++23/print.cc (__open_terminal(FILE*)): Avoid fileno macro. --- diff --git a/libstdc++-v3/src/c++23/print.cc b/libstdc++-v3/src/c++23/print.cc index d72ab8560178..be9762bbfdcc 100644 --- a/libstdc++-v3/src/c++23/print.cc +++ b/libstdc++-v3/src/c++23/print.cc @@ -76,7 +76,7 @@ namespace if (int fd = ::_fileno(f); fd >= 0) return check_for_console((void*)_get_osfhandle(fd)); #elifdef _GLIBCXX_HAVE_UNISTD_H - if (int fd = ::fileno(f); fd >= 0 && ::isatty(fd)) + if (int fd = (::fileno)(f); fd >= 0 && ::isatty(fd)) return f; #endif }