From patchwork Sun Dec 17 00:03:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 82321 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7982B3857038 for ; Sun, 17 Dec 2023 00:04:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A839C38582B5 for ; Sun, 17 Dec 2023 00:03:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A839C38582B5 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A839C38582B5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702771426; cv=none; b=qs7e1iGEzgpDw/BpVFK3bnE7x28C9XzOEkzlDQ0CNkgv7A2TFLUmRPE03shHbp+frh0pfV2J4lFurXTi6FaSiwP7oTmLAgy/ST+B4UaC8/D9M5xHKR5aK7sErCyCKJXsI7c5Z8+sH/GFAlLFNEi3T38kXUdA5+57G9kmP9g2yvM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702771426; c=relaxed/simple; bh=xs2UxrVs55DJ7ZBRcO07F+tJEQRYfLvAAX0x0W1MB2w=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=O3/m7qe4W2bzb+vk3xg0icMBbFFGnpF+Vrr4XnvZQtcA7FLnHGV9BAFfLJSELP0FIF7fFluvn1e7BDycOE55rzs2yv+HITKxpLy79UX8V7yVpjHua1vGATHxmFdRyDi+jvIumlaU7rCl85wLdSwkn8dSIuCKWtraS/tQTU7Xs/U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702771425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xe2lrkGrCPI1ka4a8vRVSdE2nq9/VOEfd4z1OVwibHE=; b=adkAzyGYNZeHVUCs958b/SKuVvaXlq3KaV3pH4DejEBYQBgMaiE+hjN1TZ1YKQWoE1GNW8 UrfHyxgXIR0v7tHuS1W3Yl6vUX6019RIK7QwYPEalAU0dsBePm9tBgPv7U5DeCQOY/uVlY PAV0/M0zx9INJNNd7K+C3MP3jGOxhZA= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-77MpSZXmPyGm64ckstfsOg-1; Sat, 16 Dec 2023 19:03:42 -0500 X-MC-Unique: 77MpSZXmPyGm64ckstfsOg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E00D83C0BE2B; Sun, 17 Dec 2023 00:03:41 +0000 (UTC) Received: from localhost (unknown [10.42.28.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB3EA1C060B1; Sun, 17 Dec 2023 00:03:41 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix bootstrap on AIX due to fileno macro Date: Sun, 17 Dec 2023 00:03:24 +0000 Message-ID: <20231217000341.2325821-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Tested x86_64-linux (and built on AIX). Pushed to trunk. -- >8 -- 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. --- 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 }