code duplication in ccan (was: Re: snprintf on SunOS)

Andrew Bartlett abartlet at samba.org
Sat Jun 30 01:58:28 MDT 2012


On Sat, 2012-06-30 at 16:07 +0930, Rusty Russell wrote:

> One thing that bothers me: the wildcards in SAMBA_LIBRARY's abi_match
> are *almost* redundant; we could generate an actual list for the version
> script from (simplistic) parsing of headers (and verify it against nm on
> platforms where we *do* support __attribute__((visibility))).

> (Note: _PUBLIC_ isn't quite a complete replacement for abi_match: you
> can't mark a variable with a visibility attribute.  tdb needs this for
> tdb_null, so that would need _PUBLIC_DATA_ too).
> 
> Thoughts?
> Rusty.

Developed earlier than waf was a series of scripts to do exactly this: 
source3/script/mksyms.sh and source3/script/mksyms.awk

We could make it that if a pattern match is not specified, then code
like this (probably rewritten just to be internal python) should
generate up the list, from the declared public headers.  

That would match Simo's goal expressed earlier today that the public .h
files be the source of the ABI.

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org



More information about the samba-technical mailing list