Re: [PATCHES] symbol visibility

Michael Biebl wrote:
> Dan Williams wrote:
>> On Fri, 2008-08-15 at 23:06 +0200, Michael Biebl wrote:
>>> Marcel Holtmann wrote:
>>>> If the versioning script would handle regular expression by itself, then
>>>> that would be a lot simpler actually. At least I couldn't get that to
>>>> work.
>>> Afaik, this should work just fine. A version script like
>>> {
>>> global:
>>> 	conman_*;
>>> local:
>>> 	*;
>>> }
>>> should work in your case.
>>> Problem is, that within NM, the nm_* prefix is also used for private
>>> functions, so we can't use that, unless we change all those private
>>> functions to something like _nm_* (which would mean a lot of code changes)
>> I don't really mind renaming internal things since that's obviously the
>> "correct" thing to do.
> Ok, so would you actually prefer this approach then?
> A common nm_* prefix for publicly exported API and renaming of the
> private API to _nm_* (or __nm_*) while symplifying the version script
> and using a regexp nm_* (which means the version script doesn't have to
> be touched on API changes)?

I did a bit of search and replace using sed and implemented this approach.

Patch 0002 now uses a regex and patch 0003 updates the sources to
replace all occurences of private nm_* functions with __nm_*.
I didn't change (private) functions, which don't start with a nm_
prefix, like the crypto_* ones.

Patch 0004 finally fixes the test-crypto compilation (instead of
removing it).

Dan, if you prefer to list all exported symbols explicitly in the
version script, we could use patch 0002 from my last email, instead of
the attached one.


Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: 0001-symbol-visibility.patch.gz
Description: GNU Zip compressed data

Attachment: 0002-Add-the-actual-version-scripts.patch.gz
Description: GNU Zip compressed data

Attachment: 0003-Add-__-prefix-to-private-nm_-functions.patch.gz
Description: GNU Zip compressed data

Attachment: 0004-Fix-test-crypto-binary.patch.gz
Description: GNU Zip compressed data

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]