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.
This commit is contained in:
Jonathan Wakely 2023-12-16 23:51:09 +00:00
parent cb76f46c97
commit 1f7acbf042

View file

@ -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
}