From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qE96AXNtVmPlCxAAWB0awg (envelope-from ) for ; Mon, 24 Oct 2022 06:48:19 -0400 Received: by simark.ca (Postfix, from userid 112) id 016C31E112; Mon, 24 Oct 2022 06:48:18 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=CNRt83rx; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 simark.ca (Postfix) with ESMTPS id 453DD1E0CB for ; Mon, 24 Oct 2022 06:48:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A72093858025 for ; Mon, 24 Oct 2022 10:48:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A72093858025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666608494; bh=s0TjXI74AWr9jtvf6GIGZAkB7/ut3yuEP1FvmMX3rTk=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=CNRt83rx+7CjdlxkXBk8vplavy0Wy4O/ogJwuLQwnw7wXiQ1V/so/TGyBhaZTiI98 2ym/vXiqaTO+oqyR7hfKm36mAOMl7F7PFMuVBeELD9UJChFqG7aInXg1YQGXlnwz5p vlgF5GsE/l/D29S6r0pJiyZDdxybZ+MbgRnptKiw= Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 155233858412 for ; Mon, 24 Oct 2022 10:47:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 155233858412 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id BC26A300089; Mon, 24 Oct 2022 10:47:48 +0000 (UTC) Message-ID: Date: Mon, 24 Oct 2022 19:47:45 +0900 Mime-Version: 1.0 Subject: Re: [PATCH 02/40] sim: Check known getrusage declaration existence Content-Language: en-US To: Mike Frysinger , gdb-patches@sourceware.org References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tsukasa OI via Gdb-patches Reply-To: Tsukasa OI Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022/10/23 22:59, Mike Frysinger wrote: > On 20 Oct 2022 09:32, Tsukasa OI wrote: >> Clang generates a warning if there is a function declaration/definition >> with zero arguments. Such declarations/definitions without a prototype (an >> argument list) are deprecated forms of indefinite arguments >> ("-Wdeprecated-non-prototype"). On the default configuration, it causes a >> build failure (unless "--disable-werror" is specified). >> >> Such getrusage function declarations are placed in three files under sim/ppc >> and to avoid defining those on the modern environments, this commit will >> make the configuration script to find the known declaration of getrusage >> and defines HAVE_DECL_GETRUSAGE if it finds one. >> >> If we find one (and we *will* in most modern environments), we don't need >> to rely on the deprecated declarations. >> --- >> sim/config.h.in | 4 ++++ >> sim/configure | 32 ++++++++++++++++++++++++++++++++ >> sim/configure.ac | 10 ++++++++++ >> 3 files changed, 46 insertions(+) > > you didn't actually fix the bad prototypes in the ppc code -- just delete them. > pretty sure once you do, you won't need any of these changes. > -mike I wasn't sure that we could remove getrusage declarations without prototype because it drops support for *really* old environments. If we can "just" remove getrusage declarations (it seems you are okay with it), that will get definitely simpler. Thanks, Tsukasa