1 | /* |
2 | Copyright Rene Rivera 2011-2015 |
3 | Distributed under the Boost Software License, Version 1.0. |
4 | (See accompanying file LICENSE_1_0.txt or copy at |
5 | http://www.boost.org/LICENSE_1_0.txt) |
6 | */ |
7 | |
8 | #ifndef BOOST_PREDEF_LANGUAGE_STDC_H |
9 | #define BOOST_PREDEF_LANGUAGE_STDC_H |
10 | |
11 | #include <boost/predef/version_number.h> |
12 | #include <boost/predef/make.h> |
13 | |
14 | /* tag::reference[] |
15 | = `BOOST_LANG_STDC` |
16 | |
17 | http://en.wikipedia.org/wiki/C_(programming_language)[Standard C] language. |
18 | If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. |
19 | |
20 | [options="header"] |
21 | |=== |
22 | | {predef_symbol} | {predef_version} |
23 | |
24 | | `+__STDC__+` | {predef_detection} |
25 | |
26 | | `+__STDC_VERSION__+` | V.R.P |
27 | |=== |
28 | */ // end::reference[] |
29 | |
30 | #define BOOST_LANG_STDC BOOST_VERSION_NUMBER_NOT_AVAILABLE |
31 | |
32 | #if defined(__STDC__) |
33 | # undef BOOST_LANG_STDC |
34 | # if defined(__STDC_VERSION__) |
35 | # if (__STDC_VERSION__ > 100) |
36 | # define BOOST_LANG_STDC BOOST_PREDEF_MAKE_YYYYMM(__STDC_VERSION__) |
37 | # else |
38 | # define BOOST_LANG_STDC BOOST_VERSION_NUMBER_AVAILABLE |
39 | # endif |
40 | # else |
41 | # define BOOST_LANG_STDC BOOST_VERSION_NUMBER_AVAILABLE |
42 | # endif |
43 | #endif |
44 | |
45 | #if BOOST_LANG_STDC |
46 | # define BOOST_LANG_STDC_AVAILABLE |
47 | #endif |
48 | |
49 | #define BOOST_LANG_STDC_NAME "Standard C" |
50 | |
51 | #endif |
52 | |
53 | #include <boost/predef/detail/test.h> |
54 | BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDC,BOOST_LANG_STDC_NAME) |
55 | |