[Xcb] Win32 port - pls review

Rémi Denis-Courmont remi at remlab.net
Wed Mar 31 01:29:58 PDT 2010


On Wednesday 31 March 2010 10:51:30 Barton C Massey, you wrote:
> In message <4BB26C4D.8090109 at opentext.com> you wrote:
> > _XCB_WINDEFS_H -- identifiers starting with underscore followed by
> > another underscore or a capital letter are reserved in C (7.1.3). I've
> > already lost this battle, as the rest of xcb already stomps on this
> > namespace, but I thought I'd point it out.
> >
> > What does the rest of the list think? Is it better to use a name that
> > resembles the rest of the names in XCB, or should we try to avoid the
> > reserved namespace going forward?
> 
> I don't have a copy of the C spec handy, but if you are
> right about 7.1.3 this is kind of insane.

It's in the C99 spec. You can find TC3 for free as a PDF there:
http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf

> Folks have been
> using _FILENAME_H to wrap include files for literally as
> long as I can remember.

Folks do that because standard C headers do that. But standard C headers are 
part of the C "implementation", so they are allowed to use reserved 
identifiers.

> What does the standard "reserve" these names for, anyway?

I guess it's intended for:
- linker name mangling,
- "internal" exported functions of the C run-time.

> I say we ignore it.

The POSIX spec reserves all identifiers ending with "_t" by the way, and a 
*lot* of other stuff. See the full list §2.2.2 there:
http://www.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html

-- 
Rémi Denis-Courmont


More information about the Xcb mailing list