Hi Mark,
Mark Kettenis wrote on Tue, May 10, 2016 at 12:31:05AM +0200:
> Philip Guenther wrote:
>> On Mon, 9 May 2016, Ingo Schwarze wrote:
>>> The libedit build system is unusual in so far as it compiles almost all
>>> C files (but not all of them) as a single compilation unit, editline.c,
>>> that #includes most of the other *.c files.
>>> ...
>>> I'd prefer compiling all modules seperately, like we do it for most
>>> other libraries. To preserve the benefit of hiding internal interfaces
>>> from the public interface, i'd like to use
>>> __attribute__((visibility("hidden"))) as suggested by Philip Guenther@.
>> The one caveat I failed to mention is that visibility doesn't work for the
>> static library. The result is that while you can use arbitrary names for
>> static symbols, hidden symbols *do* need to follow some sort of naming
>> scheme to avoid accidental overriding when static linking.
>>
>> With that caveat: go for it!
> well, probably should use
>
> __dso_hidden
>
> instead of
>
> __attribute__((visibility("hidden")))
Do i understand correctly that __dso_hidden already is a semi-standard
macro doing exactly what the "protected" macro in libedit was invented
for? Such that it would make sense to do a global
s/protected/__dso_hidden/
over the whole code, making the code do in a semi-standard way
what it is now doing in a home-grown way?
Thanks for your advice,
Ingo