From patchwork Wed Oct 30 07:37:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 99809 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 887BE385840E for ; Wed, 30 Oct 2024 07:38:37 +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 ESMTP id E5FF73858D28 for ; Wed, 30 Oct 2024 07:38:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E5FF73858D28 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 E5FF73858D28 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=1730273886; cv=none; b=dYZDxEMryELlRVCsLx3nSb3Mr1c8pimNaxrewg+JW0Ob0vQ+1JMoPFro+GboKueD9aQsLYXzuG7/qsXeXltOY87iVbFHLxb4mDz5U7WFgiknzzqYNM3Od6bRMRunn9G+CKRHmMWzbFDgvTjTmTqxNM0nvInRheLJzvhM+kNOzO4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730273886; c=relaxed/simple; bh=aUjN+UStUGby1pQUPptpcuGmtcFqSxKLMDON9YN8mqg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Cizo4L0m6GJ0Wp/cYPd7uUsMXI9bfAp1pmr30S1Dak3UXWzVkmJl72kTyGa3teltBPNBM4fsf60l63VxRoDqdMJKBLZ5ft6HpaGoBX3QoQQM78icDlU176xJ/T1Om59WNXuYQZWzxej/dzhQG5rGBvkVLb9ypXv8Rvu0CK+P8sg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730273883; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=rL6LnfmELnKjTgaNMaf1DLbnV4pZDfzW2OP3jaJ22wg=; b=GD0TYaqGK4Duw/onNeI3ZFWQu//U5NzhmhaeD5eVxUcgPj5y8kXAmz3dn0R6kov+usjZol kGsvuBFoQKwssiVtVxmO69+GDJ18JtfWSkyAjBkc8pjldgRfvpvrvOCjofaFW41QyZ2DoU LTCFEF0bwdxGoGJVGgvIhBnTjPhU2zQ= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-UVgsrrcHP4iQ2tPfTXLnPQ-1; Wed, 30 Oct 2024 03:37:59 -0400 X-MC-Unique: UVgsrrcHP4iQ2tPfTXLnPQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AB7F31955F43; Wed, 30 Oct 2024 07:37:58 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.16]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0955F19560AA; Wed, 30 Oct 2024 07:37:57 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 49U7btcT1784817 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 30 Oct 2024 08:37:55 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 49U7bsNS1784816; Wed, 30 Oct 2024 08:37:54 +0100 Date: Wed, 30 Oct 2024 08:37:54 +0100 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] genmatch: Fix build on hppa64-hpux [PR117348] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org Hi! Apparently autoconf defines the HAVE_DECL_* macros to 0 rather than not defining them at all, so defined(HAVE_DECL_FMEMOPEN) test doesn't do much. The following patch fixes it by testing HAVE_DECL_FMEMOPEN for being non-zero instead. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-10-30 Jakub Jelinek PR middle-end/117348 * genmatch.cc: Replace defined(HAVE_DECL_FMEMOPEN) test with HAVE_DECL_FMEMOPEN. Jakub --- gcc/genmatch.cc.jj 2024-10-27 16:44:30.792004967 +0100 +++ gcc/genmatch.cc 2024-10-29 18:04:52.888907269 +0100 @@ -585,7 +585,7 @@ diag_vfprintf (FILE *f, int err_no, cons fprintf (f, "%s", q); } -#if defined(GENMATCH_SELFTESTS) && defined(HAVE_DECL_FMEMOPEN) +#if defined(GENMATCH_SELFTESTS) && HAVE_DECL_FMEMOPEN #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-attribute=format"