From nobody Wed Feb 8 15:24:33 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PBkM31D7lz3nXHn for ; Wed, 8 Feb 2023 15:24:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PBkM25vTXz3Fv3 for ; Wed, 8 Feb 2023 15:24:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x531.google.com with SMTP id u21so20961150edv.3 for ; Wed, 08 Feb 2023 07:24:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6peBK8MDw5yE0Fd0yOALWQqTIU5t8JvmIdMi0Tu4VZo=; b=WOU/BKsnHIiMTqQGR0ndPHqLeXErSRe59UBPQ6DdHLKQFbMN0/MAz6GP0b9ANt+ZrS b/AzZdEjj9AIyOkxRlzVkCPLyFPVv0vX4RjV91tm72w+qvQYZ/W2AK8Qv4EwcJly1kiQ dOtjTkObjxltcqrdOHs+OnqiOxWjKMW5N6T+pp1ZWplN4FrHdkFDFHHUYYvUJPUo6m9a td+Jsyf9jT9xv0TIVa9OjIdBMzmS03sjJ1kMANSoJYqbAVi23JrRruhJH4VEDJxnFPIw 3phY5iBpI3NnRZpIwE5iNzDS+K7HeXOHZHVp3Vo52yQclTjJPPxYBI9ow+uf1boduTgY kWBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6peBK8MDw5yE0Fd0yOALWQqTIU5t8JvmIdMi0Tu4VZo=; b=iRx6NY73rEKlevV2DaieV5iVlEGiJbihsTAzw/nNCD1o5so+yLgpROpy200RzhWrJu MbZ0r315CHJSMqFJt9G4E8i104LDuZ/9GsMPhmveFzrxBnyehPUUzweur7ojFC2+F6EK jXsjr5m2lUithaBa0dE9gF4OddvMLZgdSn3uopnIonpzQ0IDSk3lDdF2q8DIV6Httsb/ pGVNwTe6FzjwlTLbl9JsqQgKmrXGRsPdm5Csf46CdwLU/k5348+i9VvCNe5Vc/8ou7Uw eitCQkC09AvVIbC2+Z0q5HKWlscMEr9dGvdx1k+7mJSK6WjNXNVtXKH3Vny+J0uVVfSw dGDg== X-Gm-Message-State: AO0yUKX8GdZe/dQo8oVhtE8mznovI2LrcZzgVv+Xvb+fzoGlJtmzZhzE kg6cHbfQhjSaUhRcefTq3IavqcvfQm6ISHTtHX9qTQ== X-Google-Smtp-Source: AK7set9lycO9u9xElgcnE9IdwJS4L2taOPKNFXA7O6J7gyNMdfIVByrkCODPSEMWKeO9rd55qVNaHwHAE60CRq3ROok= X-Received: by 2002:a50:d0cf:0:b0:4ab:d49:2120 with SMTP id g15-20020a50d0cf000000b004ab0d492120mr620854edf.0.1675869884830; Wed, 08 Feb 2023 07:24:44 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202302080610.3186ANQd091168@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 8 Feb 2023 08:24:33 -0700 Message-ID: Subject: Re: git: 2ffdc21324bd - main - config: make changes to allow some parts to build as C++ To: Kyle Evans Cc: Konstantin Belousov , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000002ceb7d05f431dd32" X-Rspamd-Queue-Id: 4PBkM25vTXz3Fv3 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000002ceb7d05f431dd32 Content-Type: text/plain; charset="UTF-8" On Wed, Feb 8, 2023, 8:09 AM Kyle Evans wrote: > On Wed, Feb 8, 2023 at 7:12 AM Konstantin Belousov > wrote: > > > > On Wed, Feb 08, 2023 at 06:10:23AM +0000, Kyle Evans wrote: > > > The branch main has been updated by kevans: > > > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=2ffdc21324bd1772fa2f40efed3987afecabf5cb > > > > > > commit 2ffdc21324bd1772fa2f40efed3987afecabf5cb > > > Author: Kyle Evans > > > AuthorDate: 2023-02-08 06:02:56 +0000 > > > Commit: Kyle Evans > > > CommitDate: 2023-02-08 06:09:10 +0000 > > > > > > config: make changes to allow some parts to build as C++ > > > > > > Highlights: > > > - Avoid keywords (this, not) as variable names > > > - Move yyparse into config.h with other declarations > > > - All declarations in config.h are assumed guilty until proven > innocent > > > - Some const-correctness > > > - Casting malloc/calloc returns > > > > > > Note that we're not building any C++ here yet, this will be > introduced > > > in other commits to replace some of the lib dependencies. > Reducing the > > > number of FreeBSD-specific dependencies we have reduces some > friction > > > for building our bootstrap tools independently in other > environments. > > > > > > Reviewed by: imp > > > Sponsored by: Klara, Inc. > > > Sponsored by: NetApp, Inc. > > > Differential Revision: https://reviews.freebsd.org/D38274 > > > --- > > > usr.sbin/config/config.h | 6 ++++++ > > > usr.sbin/config/main.c | 19 ++++++++++--------- > > > usr.sbin/config/mkmakefile.c | 44 > ++++++++++++++++++++++---------------------- > > > usr.sbin/config/mkoptions.c | 28 ++++++++++++++-------------- > > > 4 files changed, 52 insertions(+), 45 deletions(-) > > > > > > diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h > > > index 79d0a788bae7..7d97d66979e2 100644 > > > --- a/usr.sbin/config/config.h > > > +++ b/usr.sbin/config/config.h > > > @@ -35,12 +35,15 @@ > > > /* > > > * Config. > > > */ > > > +#include /* __BEGIN_DECLS/__END_DECLS */ > > But sys/types.h already includes sys/cdefs.h (as most of our headers). > > > > Indeed, I couldn't recall if we can/should rely on the implicit > inclusion or not and added it anyways. I'll fold removal into the last > config(8) change along these lines[0], which I'll probably land > tonight if I don't get any major complaints from the ones I've already > landed. > Sounds good. I meant to give feedback on that then got the creeping crude for a couple of days. I was going to make the same suggestion since I asked in the review . Warner > Thanks, > > Kyle Evans > > [0] https://reviews.freebsd.org/D38276 > --0000000000002ceb7d05f431dd32 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Feb 8, 2023, 8:09 AM Kyle Evans <kevans@freebsd.org> wrote:
On Wed, Feb 8, 2023 at 7:12 AM Konstantin Belous= ov <kostikbel@gmail.com> wrote:
>
> On Wed, Feb 08, 2023 at 06:10:23AM +0000, Kyle Evans wrote:
> > The branch main has been updated by kevans:
> >
> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D2ffdc21324bd1772fa2f40efe= d3987afecabf5cb
> >
> > commit 2ffdc21324bd1772fa2f40efed3987afecabf5cb
> > Author:=C2=A0 =C2=A0 =C2=A0Kyle Evans <kevans@FreeBSD.org><= br> > > AuthorDate: 2023-02-08 06:02:56 +0000
> > Commit:=C2=A0 =C2=A0 =C2=A0Kyle Evans <kevans@FreeBSD.org><= br> > > CommitDate: 2023-02-08 06:09:10 +0000
> >
> >=C2=A0 =C2=A0 =C2=A0config: make changes to allow some parts to bu= ild as C++
> >
> >=C2=A0 =C2=A0 =C2=A0Highlights:
> >=C2=A0 =C2=A0 =C2=A0- Avoid keywords (this, not) as variable names=
> >=C2=A0 =C2=A0 =C2=A0- Move yyparse into config.h with other declar= ations
> >=C2=A0 =C2=A0 =C2=A0- All declarations in config.h are assumed gui= lty until proven innocent
> >=C2=A0 =C2=A0 =C2=A0- Some const-correctness
> >=C2=A0 =C2=A0 =C2=A0- Casting malloc/calloc returns
> >
> >=C2=A0 =C2=A0 =C2=A0Note that we're not building any C++ here = yet, this will be introduced
> >=C2=A0 =C2=A0 =C2=A0in other commits to replace some of the lib de= pendencies.=C2=A0 Reducing the
> >=C2=A0 =C2=A0 =C2=A0number of FreeBSD-specific dependencies we hav= e reduces some friction
> >=C2=A0 =C2=A0 =C2=A0for building our bootstrap tools independently= in other environments.
> >
> >=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 imp
> >=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Klara, Inc.
> >=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0NetApp, Inc.
> >=C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0 https://reviews.freebsd.org/D38274
> > ---
> >=C2=A0 usr.sbin/config/config.h=C2=A0 =C2=A0 =C2=A0|=C2=A0 6 +++++= +
> >=C2=A0 usr.sbin/config/main.c=C2=A0 =C2=A0 =C2=A0 =C2=A0| 19 +++++= +++++---------
> >=C2=A0 usr.sbin/config/mkmakefile.c | 44 ++++++++++++++++++++++---= -------------------
> >=C2=A0 usr.sbin/config/mkoptions.c=C2=A0 | 28 ++++++++++++++------= --------
> >=C2=A0 4 files changed, 52 insertions(+), 45 deletions(-)
> >
> > diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h<= br> > > index 79d0a788bae7..7d97d66979e2 100644
> > --- a/usr.sbin/config/config.h
> > +++ b/usr.sbin/config/config.h
> > @@ -35,12 +35,15 @@
> >=C2=A0 /*
> >=C2=A0 =C2=A0* Config.
> >=C2=A0 =C2=A0*/
> > +#include <sys/cdefs.h>=C2=A0 =C2=A0 =C2=A0 =C2=A0/* __BEGI= N_DECLS/__END_DECLS */
> But sys/types.h already includes sys/cdefs.h (as most of our headers).=
>

Indeed, I couldn't recall if we can/should rely on the implicit
inclusion or not and added it anyways. I'll fold removal into the last<= br> config(8) change along these lines[0], which I'll probably land
tonight if I don't get any major complaints from the ones I've alre= ady
landed.

Sounds good. I meant to give feedback on that then got the creeping = crude for a couple of days.=C2=A0 I was going to make the same suggestion s= ince I asked in the review .=C2=A0

Warner


Thanks,

Kyle Evans

[0] https://reviews.freebsd.org/D38276
--0000000000002ceb7d05f431dd32--