using 'ld -r' and limit the exported symbols
Henrik Nordstrom
hno at squid-cache.org
Thu Jun 24 08:21:20 GMT 2004
On Thu, 24 Jun 2004, Stefan (metze) Metzmacher wrote:
> what I want to do is having private functions inside a subsystem, which
> should not be accessable by other parts, in the same way we often use
> 'static' function which are private only to one source file.
If this is your goal then just place the private function prototypes in a
private header file within the subsystem, or within a suitable #if block
making them private..
No sane person would call functions for which a prototype is not easily
accessible and which is clearly understood as private once one finds where
the prototype is defined.
No, this does not prevent calling of this function, but makes the compiler
warn when you try and makes the "user" aware he is doing something wrong.
Regards
Henrik
More information about the samba-technical
mailing list