From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Zj55CTKEDGJjIwAAWB0awg (envelope-from ) for ; Tue, 15 Feb 2022 23:57:22 -0500 Received: by simark.ca (Postfix, from userid 112) id 154BD1F3C9; Tue, 15 Feb 2022 23:57:22 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 AB2061EE1A for ; Tue, 15 Feb 2022 23:57:21 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3CC453857C40 for ; Wed, 16 Feb 2022 04:57:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3CC453857C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644987441; bh=g3ABwRaHbl7eXSHK4kapsSzIYpNqfndrdKRkBJyXT8A=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=iD4eS/yrFtrgX2Gu5onWvegs+Qb3550qNXQ23MWo40HsIQjS8L+zAliE/RYKF0sa3 enQw3d7pEqMM93vtdju43djaK30+f7qZuIFUXrm2aczrZRntHGfyZi5UsBNKIMG35D kVmHnBPzefRDBIht1m/UchrCcuZtLktKnQ/5Y40A= Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 96A863858D3C for ; Wed, 16 Feb 2022 04:57:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 96A863858D3C Received: by smtp.gentoo.org (Postfix, from userid 559) id 168B4343404; Wed, 16 Feb 2022 04:57:02 +0000 (UTC) Date: Tue, 15 Feb 2022 23:57:00 -0500 To: Hans-Peter Nilsson Subject: Re: [PATCH 11/12] sim/testsuite/cris: Remove faulty use of basename in C tests Message-ID: Mail-Followup-To: Hans-Peter Nilsson , gdb-patches@sourceware.org References: <20220214225824.AC90A20439@pchp3.se.axis.com> <20220214230724.2C0AA20439@pchp3.se.axis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OP9/IMZyzSZo9npi" Content-Disposition: inline In-Reply-To: <20220214230724.2C0AA20439@pchp3.se.axis.com> 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: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --OP9/IMZyzSZo9npi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 15 Feb 2022 00:07, Hans-Peter Nilsson via Gdb-patches wrote: > --- a/sim/testsuite/cris/c/stat3.c > +++ b/sim/testsuite/cris/c/stat3.c > @@ -7,13 +7,14 @@ > #include > #include > #include > +#define mybasename(x) ({ const char *x_ =3D (x), *y_ =3D strrchr (x_, '/= '); y_ !=3D NULL ? y_ + 1 : x_; }) > =20 > int main (int argc, char *argv[]) > { > char path[1024] =3D "/"; > struct stat buf; > =20 > - strcat (path, basename (argv[0])); > + strcat (path, mybasename(argv[0])); GNU style (and this file style) says to put space before the ( -mike --OP9/IMZyzSZo9npi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIMhBsACgkQQWM7n+g3 9YHoXA/8CYZYH0FfJlxMPFnBhdzkBeb2v4MVFDmWY01FOYg4zbOSmB5nQ7ssscf9 erdbvc/w1DNuhki9eS/lQqe75Mbvvrg9cCxmR3+6yyYY2ZR8UL8nIHwyXN5UA5Z1 uBcyw2CTW5LtWRxrQOhcAG15ABTgrAYgX+vNxvi8sdsBMWpA4IurEGkTN2Ra+UXQ 73YnihU148vTpm1Exl0U9FNsgzgOwGfc2EpCto5l7sw19D7qhW/wiVpLktfYRqLX k7+ZAQGEo2+f85k23ZLHkD21S0QiZZM09ZvEonwUeK3VzNndTrb0N+SHdWrMJLuY En596Zi5/bIeFMZjSD2iki3YESDOck+qSXrfI7HBe2zOFv7whFdpKXQDRW2oc5XP 1At6ajV19EtzFph2wOVyi/OJnRVjH2jQaTYI4TKRWXPjVjnHXfmQjJO8aG0r0i9U MSUK1FM+uDP3tSI7H/Mxn3XjlyS+OWqQUZ4HJcbRW8r32iBerYbxqvmLuWAQ90km oDD2eiACyElVQGkuIZO5O8lJ8Uhcf4uNWFmDIYHoT0PZYwtbOxg+eNEhsOjMd5Qn +wlAX+ps+B3h3Rn32T5KsgybE9LZe9kuG1ArVS3uIPc56w8Tqa30z1z2/SUW8meh Uv9GPnxWkcZDwQb5/0jBW+ukeRl+s/uxmYpzuT5qE5rg6N+iq+Y= =CngP -----END PGP SIGNATURE----- --OP9/IMZyzSZo9npi--