From owner-svn-src-all@freebsd.org Mon Jul 30 15:46:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E2F21059F13; Mon, 30 Jul 2018 15:46:11 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F107077093; Mon, 30 Jul 2018 15:46:10 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id CE4F35A9F17; Mon, 30 Jul 2018 15:46:03 +0000 (UTC) Date: Mon, 30 Jul 2018 15:46:03 +0000 From: Brooks Davis To: Konstantin Belousov Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336835 - head/lib/libc/gen Message-ID: <20180730154603.GA49837@spindle.one-eyed-alien.net> References: <201807281908.w6SJ80qo089859@repo.freebsd.org> <20180728200611.GA40119@kib.kiev.ua> <20180728203253.GB40119@kib.kiev.ua> <20180728214523.GC40119@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline In-Reply-To: <20180728214523.GC40119@kib.kiev.ua> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 15:46:11 -0000 --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 29, 2018 at 12:45:23AM +0300, Konstantin Belousov wrote: > On Sat, Jul 28, 2018 at 01:59:16PM -0700, Conrad Meyer wrote: > > On Sat, Jul 28, 2018 at 1:32 PM, Konstantin Belousov > > wrote: > > > Our existing practice is to not provide an advise in the man pages > > > for the userspace code which would harm the portability or the standa= rd > > > conformance. > >=20 > > Perhaps, but you do not have to look beyond this manual page to find > > that such a practice, if it is even nominally applied, is not followed > > consistently. The remainder of the document spells the terminating > > value as plain "NULL." FreeBSD manual pages consistently refer to > > NULL as a pointer value. > >=20 > > The Linux manual page spells the terminating value (char *)NULL and > > explicitly documents why. That is perhaps both pedantically correct > > and clear. I am amenable to such a change. > I do not see much difference between (char *)0 and (char *)NULL. Both > are better there, because both are correct. >=20 > If you prefer (char *)NULL, please use it. >=20 > >=20 > > > I am not so sure about CheriBSD, for instance. > >=20 > > I observe simply that CheriBSD is not FreeBSD and that CHERI is an > > exotic architecture. > We should not give an advise which breaks other architectures, even > if not included into the mainline repo. CheriBSD would be fine because FreeBSD uses (void *)0 for NULL. That said, C++ requires that NULL be a bare 0 or nullptr so (char *)NULL is likely the most portable. -- Brooks --0F1p//8PRICkK4MW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbXzK7AAoJEKzQXbSebgfAOvQH/jXAUNrzJUb7QPKHK5JnfqvU RwwgQoo2PM4Gqis6tIgIgbYVHPIyqYfWmfrJTKcWPFzRq1IVGl3LHQ9xUO/YxI2R WyyTw/Nw7y1bfcmYdKqpOpMF78qcDg68EDlUvn5Oz1rbSh2aB2TgrRQmP7mSomAj 3V/cvk94+PDeGIqhApLRxgNKb66i1Y+FG+EDsBLhhE+HvEohw/9lmJSeP8Vm7Vf3 7gLh4rRINDdxBGODd509AVLlhYa9jwADh/v0BkkpUi6wU6LHnqD1CmB3AGuvSWZ3 2PwanPlwsZWTiFcQ5E+8UABi6eWSkiqGP9yjnDkIbSAxvyC0ctoqvfjYBAEjyZE= =oTja -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW--