[Top][All Lists]
[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
- Re: [coreutils] [PATCH 2/2] stat: print timestamps to full resolution, Eric Blake, 2010/10/08
- Re: [coreutils] [PATCH 2/2] stat: print timestamps to full resolution, Jim Meyering, 2010/10/08
- [PATCH] time: enforce recent POSIX ruling that time_t is integral, Eric Blake, 2010/10/08
- Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral, Bruno Haible, 2010/10/09
- Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral, Paul Eggert, 2010/10/09
- Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral, Bruno Haible, 2010/10/10
- Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral, Paul Eggert, 2010/10/10
- Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral, Paul Eggert, 2010/10/10
- Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral,
Bruno Haible <=
- Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral, Paul Eggert, 2010/10/10
- Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral, Bruno Haible, 2010/10/10
- Re: [PATCH] time: enforce recent POSIX ruling that time_t is integral, Paul Eggert, 2010/10/10
- [PATCH] Fix mismatched parens in previous commit, Gary V. Vaughan, 2010/10/11
- Re: [PATCH] Fix mismatched parens in previous commit, Jim Meyering, 2010/10/11
- Re: [PATCH] Fix mismatched parens in previous commit, Gary V. Vaughan, 2010/10/11
- Re: [PATCH] Fix mismatched parens in previous commit, Paul Eggert, 2010/10/11
- [PATCH] rewrite int foo[2*X-1] to verify(X) or to int foo[X?1:-1], Paul Eggert, 2010/10/10
- Re: [PATCH] rewrite int foo[2*X-1] to verify(X) or to int foo[X?1:-1], Bruno Haible, 2010/10/10
- Re: [PATCH] rewrite int foo[2*X-1] to verify(X) or to int foo[X?1:-1], Paul Eggert, 2010/10/10