greenhills.h 1.9 KB

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