From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id F0997AC1713 for ; Mon, 19 Feb 2024 20:27:31 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=uFJs3+dQ/cmbd60ATuiry2YNtY+mxdXX6gxbZVe1ajQ=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1708374450; v=1; b=FnqH9/FQ39WqrY6RIEBT6HaeWfozJk4e+k8ni4ePfDqPH7TjoJ7BaznEzZwH1O7a1gjh3Smy MiwWN0b8ZZtBJ+TzzRn+GL/7Jl6gMa+47VXdj1jHoMzxGM+yQRuoSc5J489U/KXjLfjWVSuoAET 4osFnfkYVFupW/u1Hoi0hdvg= X-Received: by 127.0.0.2 with SMTP id 6lw3YY7687511xbQqa1cJMm8; Mon, 19 Feb 2024 12:27:30 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.4559.1708374449857333189 for ; Mon, 19 Feb 2024 12:27:30 -0800 X-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-520-asBlsUeoO3WinFY6866tSw-1; Mon, 19 Feb 2024 15:27:25 -0500 X-MC-Unique: asBlsUeoO3WinFY6866tSw-1 X-Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 8AE673C0008C; Mon, 19 Feb 2024 20:27:24 +0000 (UTC) X-Received: from [10.39.194.20] (unknown [10.39.194.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 871952166B31; Mon, 19 Feb 2024 20:27:23 +0000 (UTC) Message-ID: <2f3457fb-0370-af6d-1e85-d8d736fd9930@redhat.com> Date: Mon, 19 Feb 2024 21:27:22 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH edk2-libc 1/1] StdLib: Remove the 'register' keyword from public interfaces To: devel@edk2.groups.io, pedro.falcato@gmail.com Cc: Rebecca Cran , Michael D Kinney , Jayaprakash N , pawel.karczewski@solidigm.com References: <20240216214653.86540-1-pedro.falcato@gmail.com> From: "Laszlo Ersek" In-Reply-To: <20240216214653.86540-1-pedro.falcato@gmail.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: i2lKEXOrrNDttvXB1zdmXITNx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="FnqH9/FQ"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 2/16/24 22:46, Pedro Falcato wrote: > ISO C interfaces do not have the 'register' keyword, so this is > technically non-compliant and other consumers of C headers (such as C++) > will error out when seeing this keyword. >=20 > This should not affect anything, functionality-wise or ABI-wise. >=20 > Cc: Rebecca Cran > Cc: Michael D Kinney > Cc: Jayaprakash N > Cc: pawel.karczewski@solidigm.com > Signed-off-by: Pedro Falcato > --- >=20 > This should fix your problem. Pawel, can you check? >=20 > StdLib/Include/stdlib.h | 8 ++++---- > StdLib/Include/string.h | 6 +++--- > StdLib/LibC/StdLib/Environs.c | 4 ++-- > StdLib/LibC/String/strsep.c | 10 +++++----- > 4 files changed, 14 insertions(+), 14 deletions(-) >=20 > diff --git a/StdLib/Include/stdlib.h b/StdLib/Include/stdlib.h > index d9aaaab39d46..42810c86e65a 100644 > --- a/StdLib/Include/stdlib.h > +++ b/StdLib/Include/stdlib.h > @@ -33,8 +33,8 @@ > void exit (int status) __noreturn; > void _Exit (int status) __noreturn; > char *getenv (const char *name); > - int setenv (register const char * name, > - register const char * value, int rewrite); > + int setenv (const char * name, > + const char * value, int rewrite); > int system (const char *string); > =20 > ################ Integer arithmetic functions > @@ -279,8 +279,8 @@ char *getenv(const char *name); > **/ > int > setenv ( > - register const char * name, > - register const char * value, > + const char * name, > + const char * value, > int rewrite > ); > =20 > diff --git a/StdLib/Include/string.h b/StdLib/Include/string.h > index 0c809441e830..6acd274b848d 100644 > --- a/StdLib/Include/string.h > +++ b/StdLib/Include/string.h > @@ -71,7 +71,7 @@ > int strncasecmp (const char *s1, const char *s2, size_t n); > size_t strlcpy (char *destination, const char *source, size= _t size); > size_t strlcat (char *destination, const char *source, size= _t size); > - char *strsep (register char **stringp, register const cha= r *delim); > + char *strsep (char **stringp, const char *delim); > @endverbatim > =20 > Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved. > @@ -484,8 +484,8 @@ size_t strlcat(char *destination, const char *source= , size_t size); > */ > char * > strsep( > - register char **stringp, > - register const char *delim > + char **stringp, > + const char *delim > ); > =20 > __END_DECLS > diff --git a/StdLib/LibC/StdLib/Environs.c b/StdLib/LibC/StdLib/Environs.= c > index e8cfd6d9f400..ad16444ce89c 100644 > --- a/StdLib/LibC/StdLib/Environs.c > +++ b/StdLib/LibC/StdLib/Environs.c > @@ -209,8 +209,8 @@ char *getenv(const char *name) > **/ > int > setenv ( > - register const char * name, > - register const char * value, > + const char * name, > + const char * value, > int rewrite > ) > { > diff --git a/StdLib/LibC/String/strsep.c b/StdLib/LibC/String/strsep.c > index 234b0cabd689..d250ff781658 100644 > --- a/StdLib/LibC/String/strsep.c > +++ b/StdLib/LibC/String/strsep.c > @@ -53,13 +53,13 @@ static char sccsid[] =3D "@(#)strsep.c 8.1 (Berkeley= ) 6/4/93"; > */ > char * > strsep( > - register char **stringp, > - register const char *delim > + char **stringp, > + const char *delim > ) > { > - register char *s; > - register const char *spanp; > - register int c, sc; > + char *s; > + const char *spanp; > + int c, sc; > char *tok; > =20 > if ((s =3D *stringp) =3D=3D NULL) Reviewed-by: Laszlo Ersek -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115600): https://edk2.groups.io/g/devel/message/115600 Mute This Topic: https://groups.io/mt/104402243/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-