| 1 | /* |
| 2 | Copyright Rene Rivera 2008-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_COMPILER_GREENHILLS_H |
| 9 | #define BOOST_PREDEF_COMPILER_GREENHILLS_H |
| 10 | |
| 11 | #include <boost/predef/version_number.h> |
| 12 | #include <boost/predef/make.h> |
| 13 | |
| 14 | /* tag::reference[] |
| 15 | = `BOOST_COMP_GHS` |
| 16 | |
| 17 | http://en.wikipedia.org/wiki/Green_Hills_Software[Green Hills C/{CPP}] compiler. |
| 18 | Version number available as major, minor, and patch. |
| 19 | |
| 20 | [options="header"] |
| 21 | |=== |
| 22 | | {predef_symbol} | {predef_version} |
| 23 | |
| 24 | | `+__ghs+` | {predef_detection} |
| 25 | | `+__ghs__+` | {predef_detection} |
| 26 | |
| 27 | | `+__GHS_VERSION_NUMBER__+` | V.R.P |
| 28 | | `+__ghs+` | V.R.P |
| 29 | |=== |
| 30 | */ // end::reference[] |
| 31 | |
| 32 | #define BOOST_COMP_GHS BOOST_VERSION_NUMBER_NOT_AVAILABLE |
| 33 | |
| 34 | #if defined(__ghs) || defined(__ghs__) |
| 35 | # if !defined(BOOST_COMP_GHS_DETECTION) && defined(__GHS_VERSION_NUMBER__) |
| 36 | # define BOOST_COMP_GHS_DETECTION BOOST_PREDEF_MAKE_10_VRP(__GHS_VERSION_NUMBER__) |
| 37 | # endif |
| 38 | # if !defined(BOOST_COMP_GHS_DETECTION) && defined(__ghs) |
| 39 | # define BOOST_COMP_GHS_DETECTION BOOST_PREDEF_MAKE_10_VRP(__ghs) |
| 40 | # endif |
| 41 | # if !defined(BOOST_COMP_GHS_DETECTION) |
| 42 | # define BOOST_COMP_GHS_DETECTION BOOST_VERSION_NUMBER_AVAILABLE |
| 43 | # endif |
| 44 | #endif |
| 45 | |
| 46 | #ifdef BOOST_COMP_GHS_DETECTION |
| 47 | # if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) |
| 48 | # define BOOST_COMP_GHS_EMULATED BOOST_COMP_GHS_DETECTION |
| 49 | # else |
| 50 | # undef BOOST_COMP_GHS |
| 51 | # define BOOST_COMP_GHS BOOST_COMP_GHS_DETECTION |
| 52 | # endif |
| 53 | # define BOOST_COMP_GHS_AVAILABLE |
| 54 | # include <boost/predef/detail/comp_detected.h> |
| 55 | #endif |
| 56 | |
| 57 | #define BOOST_COMP_GHS_NAME "Green Hills C/C++" |
| 58 | |
| 59 | #endif |
| 60 | |
| 61 | #include <boost/predef/detail/test.h> |
| 62 | BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GHS,BOOST_COMP_GHS_NAME) |
| 63 | |
| 64 | #ifdef BOOST_COMP_GHS_EMULATED |
| 65 | #include <boost/predef/detail/test.h> |
| 66 | BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GHS_EMULATED,BOOST_COMP_GHS_NAME) |
| 67 | #endif |
| 68 | |