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

Re: [issues] glibc uses '__unused' as identifier, which is traditionally used by BSD as macro



On Wed, 6 May 2009, Thorsten Glaser wrote:

> think that is the way to go. I have a personal package of mirmake,
> the somewhat-portable version of MirBSD make(1), and would like to
> continue to be able to build it and software with it on GNU/Linux
> (and eventually GNU/k*BSD and GNU/HURD).

A portable application should not be making use of symbols in the 
implementation namespace, such as __unused; they should only be used by 
the implementation (compiler, libc, libstdc++ etc.) which need to 
coordinate with each other on how they are used.  Other system libraries 
should put any internal symbols in their headers in a library-specific 
namespace to reduce the risk of conflicts (e.g. __libwhatever_* or 
libwhatever_internal_*).

A BSD application using implementation-namespace symbols in the 
application is inherently unportable.

-- 
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx