Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 May 2013 13:06:50 +0200
From:      Ed Schouten <ed@80386.nl>
To:        Stefan Farfeleder <stefanf@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r250806 - head/sys/sys
Message-ID:  <CAJOYFBC3Ww-jdy2cm7QNEbVzrZJHaeo3y797BVYp53pKJ5e-Nw@mail.gmail.com>
In-Reply-To: <20130519094813.GA1465@mole.fafoe.narf.at>
References:  <201305190744.r4J7i2FD055067@svn.freebsd.org> <20130519094813.GA1465@mole.fafoe.narf.at>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Stefan,

2013/5/19 Stefan Farfeleder <stefanf@freebsd.org>:
> Shouldn't we fix lint and our headers to use a different macro name? One
> starting with __?

Fixing lint: yes. Changing our macros to use a different name: no.

The reason why we had __volatile, __inline, etc. in the first place,
was because adding definitions for volatile and inline directly would
be against the standard, as these words can be used freely in <C99.
C11 only added keywords starting with _[A-Z], which is reserved by all
the older standards, meaning we are completely free to define them in
any way we like.

This specific breakage was unrelated to the naming of the keyword. The
breakage existed, because existing tools do a build with -Dlint set.
Because we use _Thread_local in our own header files already
(runetype.h, I think), this caused a variable declared in a header
file to be of the wrong kind (TLS vs non-TLS).

In my opinion we should not add __[a-z] definitions for things that
are part of C11. Doing this only makes our code less easily exportable
to other systems.

--
Ed Schouten <ed@80386.nl>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJOYFBC3Ww-jdy2cm7QNEbVzrZJHaeo3y797BVYp53pKJ5e-Nw>