From nobody Wed Feb 8 15:09:46 2023 X-Original-To: dev-commits-src-all@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 4PBk1t4TDdz3nW9Z; Wed, 8 Feb 2023 15:09:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PBk1t415lz3F4d; Wed, 8 Feb 2023 15:09:54 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675868994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7c7aocgaKPQA4HgKt7XrUK6ewlLolDTFiML6iXttw0E=; b=Z4jjEf/1DdjdrCoKAJdmuumI95HINOs1r4NIycDoMtCGC4/2biT5fF+n6YADVWvXBPy3dP KyfFFNvg76XJR++k/DRpnwWofamlIaWON0Jw0lSYBJo5+T9Ax6XVxrrqza/QcpC9WlfYxa BmrVBt76kiExD78H7RiwbgeA5AiMWRc6sqIL/GH3TTdhiBNxQ3LlF++yLdRJU5mGPJio47 xp0oMMcQIGtLqN4VzusX2WN/j/pK5/T755824+yM8ZRqrrobjAnv2slPbSgn4B0xphQEbP y+58bz/GZFk1x2a92ttg323sqMMKoWrjYuUxVzdmgkZa2QEGnXz/DODozKiaEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675868994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7c7aocgaKPQA4HgKt7XrUK6ewlLolDTFiML6iXttw0E=; b=RbclSDWOSVrPUiq3Vws1pLO2dIrYvld5+pSTF8cqG3FSx8vl/48UbjaZQELPFLziwwof3n BSoVRFBMvqj5JVzQ9GAcM+p2u9w7tqsm4UaTRtlg6M5M4HUWFZ7bQvRmkoJS/w1hStEG7y P7+yZWT2x8y/uR05D+4T5MiX3CF4IS2nMe2wa8g+OtvkqiP0HJY8wrNZSRgdWaKd1p6Ifd TdgEVAAnSQf0vyoBwDcNPLJzU5YZ8CXm8FgxLoTGvD8XP0qqR3SXNaDyR7y1YbMIMh74uf sqYk6K7HZMV+h9V+6Xy9MayZSWz2VqNJfSktl1W1c4UCi7pJj0MKXOU3HtCuhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675868994; a=rsa-sha256; cv=none; b=Ag+0ks2YHI1LClJ2XOh6dRWQ049UYniMoUWPloaxYxRv6o25t4G39Ozq9uYO938gOMp0xk n8YZwJp5pQPNuWckuYz/kiwDYauUaCu99O1cxuSs7RXk1ajbsDIDYr7ampwWKtnjfZid5T cpL5TQApaynPjALupCvS5swLEkbmPGN+fxFlqoHHxClS7Ed8d7mPvw2BtRdv+gN3ME+WB9 DHwYYv0ltPDo8m56/63RiZLsWKLKnafQAzONg+Vytao4f9JUU6aZ0kqHpi7esK/6lWcfwu 5uDGFb/ByF7uOeCleMYNVmwbDTuahy/3UunGHraZkehNL6pLe9NWCcQG4yJWAw== Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (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)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PBk1t2dXhzyFm; Wed, 8 Feb 2023 15:09:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f180.google.com with SMTP id z5so20983629qtn.8; Wed, 08 Feb 2023 07:09:54 -0800 (PST) X-Gm-Message-State: AO0yUKVijG/gedlLacQOOPy6GW1uPCVVLZgXeO71MT4xiDJBUaS+GNaH tYF/Hvr1jR7n319UFRBCjpIOdpBcnzZt1N1miTQ= X-Google-Smtp-Source: AK7set8+vZifhhHE756ivbZN0Ke+zKVPUK33gX2HAqSUrgu95urM2hpgXA3WdOkk9r33App53gTKUDfixxm1zA9x2T0= X-Received: by 2002:a05:622a:1014:b0:3b8:6bd1:950f with SMTP id d20-20020a05622a101400b003b86bd1950fmr1607513qte.128.1675868993602; Wed, 08 Feb 2023 07:09:53 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202302080610.3186ANQd091168@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Wed, 8 Feb 2023 09:09:46 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 2ffdc21324bd - main - config: make changes to allow some parts to build as C++ To: Konstantin Belousov Cc: Kyle Evans , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-ThisMailContainsUnwantedMimeParts: N 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. Thanks, Kyle Evans [0] https://reviews.freebsd.org/D38276