[RFC] importing e* (embolic, estrdup, etc) functions from NetBSD (libc/libutil or libnetbsd)?
Brooks Davis
brooks at freebsd.org
Mon Oct 19 22:09:55 UTC 2015
On Mon, Oct 19, 2015 at 09:50:12PM +0000, Poul-Henning Kamp wrote:
> --------
> In message <20151019212750.GB64504 at spindle.one-eyed-alien.net>, Brooks Davis writes:
>
> >This feels like the right approach to me as well.
>
> 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.
>
> 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 ?
>
> I far prefer sbuf(3) to e*(3)
For our code, I think I agree.
-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20151019/363a61f2/attachment.bin>
More information about the freebsd-arch
mailing list