code duplication in ccan (was: Re: snprintf on SunOS)
rusty at ozlabs.org
Sun Jun 17 18:16:32 MDT 2012
On Fri, 15 Jun 2012 01:10:01 +0200, Jelmer Vernooij <jelmer at samba.org> wrote:
> On Thu, Jun 14, 2012 at 06:57:30PM -0400, simo wrote:
> > I am really oppoe to make samba-util a dependency for tdb, samba util is
> > in NO shape to become a real public library. Let's not do the worst
> > thing we could please.
> I wasn't saying anything about making it public. ccan already *is* a
> dependency of tdb and it's not public either. Neither is a great
BTW, you mean ntdb/tdb2, not tdb?
But yes, lots of confusion here. Technically, CCAN is built as a shared
lib (not for any good reason), but it's also linked directly into
libtdb2/libntdb as it's a private dependency.
It's not *public*, that would be wrong.
> It would be nice to make samba-util public, but that would (as you
> said earlier) require some effort to clean it up and define a
> stable API.
Nice? It's a terrible idea!
Why is public better than private? More maintenance overhead for us,
more bloat and cruft as we can't remove old APIs, and it's not like
anyone else is going to use libsamba-util.so.
If you insist on making everything shared a public shared library, you
end up with coders cut & pasting to avoid the hassle. That's what tdb
did: cut & paste the hash code :(
More information about the samba-technical