svn commit: r250806 - head/sys/sys

Ed Schouten ed at 80386.nl
Mon May 20 11:06:51 UTC 2013


Hi Stefan,

2013/5/19 Stefan Farfeleder <stefanf at 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 at 80386.nl>


More information about the svn-src-all mailing list