bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral


From: Bruno Haible
Subject: Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral
Date: Mon, 11 Oct 2010 00:50:28 +0200
User-agent: KMail/1.9.9

Paul Eggert wrote:
> > But why use __ as prefix? Symbols starting with __ are, generally speaking,
> > in the territory of the implementation (libc + compiler), which is why 
> > gnulib
> > tries to use only symbols that start with a single _.
> 
> But this symbol will appear in <time.h>, so it has both flavors: from
> gnulib's point of view it is a user symbol, but from the gnulib-using
> application's point of view it appears in a Standard C header.  I can
> see both points of view and am not sure which should prevail.

Yes, gnulib is in the middle. gnulib has been happily using _ prefixed symbols
for years (all kinds of _GL* but also _UNUSED_PARAMETER_ and others), and never
encountered a conflict. Whereas when gnulib / libintl had to define a function
named '__printf__' it was quite troublesome, and when we tried to define a
function named __fpurge, we also encountered a collision with a system. And
we had collisions with __restrict as well.

From this past experience, I estimate the risk of having a collision with a
system header by using a __ prefix as higher than the risk of having a collision
with a user program by using a _ prefix.

Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]