[illumos-Developer] sed from FreeBSD, REG_STARTEND

Piotr Jasiukajtis estseg at gmail.com
Fri Aug 6 05:56:05 PDT 2010


On Fri, Aug 6, 2010 at 4:08 PM, Garrett D'Amore <garrett at damore.org> wrote:
> So FreeBSD sed depends on a macro called REG_STARTEND, which allows the
> caller to indicate where in the substring the regular expression should be
> applied.  Legacy Solaris does not support this function.
>
> I had disabled this code and left the macro undefined in the illumos libc.
>  However, it would be extremely simple to add this macro and enable the
> resulting code (which is only about 6 lines if I recall properly).
>
> The concerns I had about doing this relate to extending the Solaris API.  I
> would not like to have a situation where applications built on illumos did
> not work on Solaris.  Although sed is the only consumer I know of for this
> particular functionality.
>
> One possible way around this would be to only expose the macro in a private
> header, and only allow other consolidation members (e.g. sed) to use it.
>
> Another approach is to simply make sed carry its own copy of the regex code.
>
> So, what are the opinions here (please remember that I'm final arbiter for
> now as I have not yet appointed a developer council, but I want to hear any
> good logical rationales):
>
> a) just expose REG_STARTEND to everyone
> b) expose it only to consolidation members
> c) don't support it all in libc, and force sed to carry a separate copy
I would prefer "c)"
If BSD sed is the only one consumer of the macro, than there is no
sense to expand libc's API.

-- 
Piotr Jasiukajtis | estibi | SCA OS0072
http://estseg.blogspot.com



More information about the Developer mailing list