From owner-freebsd-arch@freebsd.org Mon Oct 19 22:09:55 2015 Return-Path: Delivered-To: freebsd-arch@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 8D649A19537 for ; Mon, 19 Oct 2015 22:09:55 +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 2A71D1108; Mon, 19 Oct 2015 22:09:55 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id C63E35A9F13; Mon, 19 Oct 2015 22:09:53 +0000 (UTC) Date: Mon, 19 Oct 2015 22:09:53 +0000 From: Brooks Davis To: Poul-Henning Kamp Cc: Ed Maste , NGie Cooper , freebsd-arch Subject: Re: [RFC] importing e* (embolic, estrdup, etc) functions from NetBSD (libc/libutil or libnetbsd)? Message-ID: <20151019220953.GC64504@spindle.one-eyed-alien.net> References: <74F6DD3C-42F6-490B-A08E-245A1338A3E7@gmail.com> <20151019212750.GB64504@spindle.one-eyed-alien.net> <94056.1445291412@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LpQ9ahxlCli8rRTG" Content-Disposition: inline In-Reply-To: <94056.1445291412@critter.freebsd.dk> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2015 22:09:55 -0000 --LpQ9ahxlCli8rRTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 19, 2015 at 09:50:12PM +0000, Poul-Henning Kamp wrote: > -------- > In message <20151019212750.GB64504@spindle.one-eyed-alien.net>, Brooks Da= vis writes: >=20 > >This feels like the right approach to me as well. >=20 > I looked at it at one point and I found it seriously lacking. By "This" I ment, sticking them in libnetbsd. For code we don't actively maintain, I'd rather pick up some extra funcitions in libnetbsd than convert the code to match our prefered mechanism unless there's a good reason to. > The philosophy seems to be "just stick 'e' in front and you're done" > but in practice that is not even close. If one wanted this approach, a libc replacment that fails stop on unrecoverable errors might be more interesting approach (somwhat with different, but still signficant limitations). > The *real* problem they're trying to solve is safe string handling, > and the e* functions only cover a small corner area of that space. >=20 > Their implemenation also seems half-hearted in many ways. For > instance they have not specified what happens if the error handler > returns to the e* function. > > And finally, C-with-exceptions ? Really ? >=20 > I far prefer sbuf(3) to e*(3) For our code, I think I agree. -- Brooks --LpQ9ahxlCli8rRTG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWJWoxAAoJEKzQXbSebgfACL8IAI0COG1Myk/g9g3DoQ1ZESAk 0gsLseQvEatDNcGgFpDSF24+awe8Vm2H8QnZHlHS1YUxeIsWvaLfEjKHKRaRLVyE 9yLw8zWRmaqR4RrDxCbS5COFTK3m043TfW6ugVRNTGgFkHXVYHlBvjsFwz9RGYRb MhOKJqvtQOSEq3ZINwVNQj0WnBlse5JipUg8r0cDBMfmE3kSzEvWtIkhnie78iKL f+dkw8k/QCQb1zA+xDrAwqLenW6+TSfThUkU+ACamleFI0d+rcg7S+yfezZKpm3z TtHPO4WYaZSD28PxrZ7e4c2mSYkYSFd8PIBVbPliwZ9S66vrDDUr+1K+tYOJgW0= =SOhk -----END PGP SIGNATURE----- --LpQ9ahxlCli8rRTG--