This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __gettimeofday visibility and sem_timedwait


On Sat, Jan 7, 2012 at 9:28 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>
> The '__' prefix is not supposed to be used in application code. ?Libc
> headers can even #define identifiers starting with it to something
> crazy and break your build.
>
Thanks, it all makes sense now.
Still I wonder if it's possible to make the linker complain, so that
the problem does not go unnoticed. Ld does not seem to have any such
functionaliy. It does check for multiple occurrence of a symbol, but
only within one output file. The only thing I can come with at the
moment that could cover symbols from shared libraries is checking
--cref output to see which files the symbols were resolved in. Stil
this would require a priori knowledge about namespace clashes, hence
not really useful in practice.

Maciek,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]