public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-6637] libstdc++: Fix bootstrap on AIX due to fileno macro
@ 2023-12-17  0:03 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-12-17  0:03 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:1f7acbf04296e4d2553570642d7290d56b99228f

commit r14-6637-g1f7acbf04296e4d2553570642d7290d56b99228f
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Sat Dec 16 23:51:09 2023 +0000

    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:
---
 libstdc++-v3/src/c++23/print.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/src/c++23/print.cc b/libstdc++-v3/src/c++23/print.cc
index d72ab856017..be9762bbfdc 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
       }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-17  0:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-17  0:03 [gcc r14-6637] libstdc++: Fix bootstrap on AIX due to fileno macro Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).