From owner-svn-src-all@freebsd.org Fri Dec 16 19:53:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 167B2C8355E; Fri, 16 Dec 2016 19:53:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D26121586; Fri, 16 Dec 2016 19:53:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::4ccf:cb4c:3c45:4bd1] (unknown [IPv6:2001:7b8:3a7:0:4ccf:cb4c:3c45:4bd1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 542EE14EBA; Fri, 16 Dec 2016 20:53:34 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_9E64CCF0-2511-4CCA-A8A1-2942F1648B83"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r310138 - head/lib/libc/stdio From: Dimitry Andric In-Reply-To: <20161216193128.wgskqt4vc44vdd7o@ivaldir.etoilebsd.net> Date: Fri, 16 Dec 2016 20:53:26 +0100 Cc: "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <8CF1AB9C-83FE-495F-B07C-56F928282512@FreeBSD.org> References: <201612160144.uBG1ipjW016736@repo.freebsd.org> <20161216193128.wgskqt4vc44vdd7o@ivaldir.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 16 Dec 2016 19:53:36 -0000 --Apple-Mail=_9E64CCF0-2511-4CCA-A8A1-2942F1648B83 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 16 Dec 2016, at 20:31, Baptiste Daroussin wrote: >=20 > On Fri, Dec 16, 2016 at 01:44:51AM +0000, Conrad E. Meyer wrote: >> Author: cem >> Date: Fri Dec 16 01:44:50 2016 >> New Revision: 310138 >> URL: https://svnweb.freebsd.org/changeset/base/310138 >>=20 >> Log: >> vfprintf(3): Add support for kernel %b format >>=20 >> This is a direct port of the kernel %b format. >>=20 >> I'm unclear on if (more) non-portable printf extensions will be a >> problem. I think it's desirable to have userspace formats include = all >> kernel formats, but there may be competing goals I'm not aware of. >>=20 >> Reviewed by: no one, unfortunately >> Sponsored by: Dell EMC Isilon >> Differential Revision: https://reviews.freebsd.org/D8426 >>=20 >=20 > I really don't think it is a good idea, if used in userland it would = be make > more of our code difficult to port elsewhere. Indeed, this is a bad idea. These custom format specifiers should be eliminated, not multiplied. :-) > Other than that, it makes more difficult to use vanilla gcc with out = userland. > and it is adding more complexity to be able to build freebsd from a = non freebsd > system which some people are working on. >=20 > Personnaly I would prefer to see those extensions removed from the = kernel rather > than see them available in userland. Same here. > Can't we use simple helper function instead? Yes, please. Just take the snprintb(3) function from NetBSD: http://netbsd.gw.com/cgi-bin/man-cgi?snprintb+3+NetBSD-current -Dimitry --Apple-Mail=_9E64CCF0-2511-4CCA-A8A1-2942F1648B83 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlhURj0ACgkQsF6jCi4glqPQsACfYEFD7dxsHbhI6Fvr43NWNIle AUoAn0cFVTr53CCuI6EszEl8h7SmDclg =h+m2 -----END PGP SIGNATURE----- --Apple-Mail=_9E64CCF0-2511-4CCA-A8A1-2942F1648B83--