[OpenAFS-devel] Re: JUAFS Makefile missing key defines?

Russ Allbery rra@stanford.edu
Wed, 10 Feb 2010 14:45:10 -0800


Jeffrey Altman <jaltman@secure-endpoints.com> writes:

> Is the existence of the __c99 preprocessor symbol a requirement of C99
> compliant compilers?  If so, we can simply conditionality use structure
> labels when __c99 is defined.

Sadly, no.

In theory, you can check whether __STDC_VERSION__ is later than 199901L.
In practice, this doesn't work very well.  Some compilers define that
before they're fully compliant (even GCC doesn't have a *fully* compliant
mode yet, although it supports structure labels), and other compilers
won't define that even if they support structure labels unless you run the
compiler in the strictly-conforming mode.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>