svn commit: samba r17738 - in
branches/SAMBA_4_0/source/lib/ldb: . ldb_tdb
jelmer at vernstok.nl
Thu Aug 24 01:01:50 GMT 2006
Hi Tridge, Simo,
On Thu, 2006-08-24 at 10:26 +1000, tridge at samba.org wrote:
> > Tridge, wouldn't it make sense to create a libreplace, and make tdb,
> > talloc, ldb and samba4 to depend on it?
> > We may even backport and share it with samba3 so that we ahve a common
> > set or replacement functions.
> possibly ... it does have some disadvantages tho.
As I expressed on IRC yesterday, I'd prefer having them in a single
place as well. Having them scattered makes maintainance harder, as
multiple copies of functions exist.
We currently have a list of functions in lib/replace/README that is
guaranteed to always be available (provided by either the system or
> Say we made a libreplace, and put all the lib/replace/ stuff from
> Samba4 in it. That would mean that even a standalone talloc or tdb
> build would start to depend on all sorts of libc functions and
> libraries that they don't need (such as things like initgroups(),
> innetgr(), chroot() etc). In turn that would mean that if some
> external project wanted to use talloc, then they would be forced to
> use our replacements for those functions.
That should be solveable by including the following line in replace.h:
#define strnlen rep_strnlen
and having the replacement be called rep_strnlen. That way, only those
that include replace.h will end up with our replacement.
> So I'm inclined to only replace functions in talloc that talloc
> actually uses, and only replace functions in tdb that tdb uses. It
> means that we are going to end up with our portability code more
> spread out though.
> Alternatively, we could try to work out some way of having a common
> lib/replace/, but only pulling in the bits that are needed when using
> it in each package. I can think of a couple of ways of doing that, but
> they aren't exactly pretty.
Using a static library should take care of that (static libs are
available on all platforms Samba4 builds on).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20060824/d8b67ee1/attachment.bin
More information about the samba-technical