ibm.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. Copyright Redshift Software, Inc. 2008-2013
  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_IBM_H
  8. #define BOOST_PREDEF_COMPILER_IBM_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /*`
  12. [heading `BOOST_COMP_IBM`]
  13. [@http://en.wikipedia.org/wiki/VisualAge IBM XL C/C++] compiler.
  14. Version number available as major, minor, and patch.
  15. [table
  16. [[__predef_symbol__] [__predef_version__]]
  17. [[`__IBMCPP__`] [__predef_detection__]]
  18. [[`__xlC__`] [__predef_detection__]]
  19. [[`__xlc__`] [__predef_detection__]]
  20. [[`__COMPILER_VER__`] [V.R.P]]
  21. [[`__xlC__`] [V.R.P]]
  22. [[`__xlc__`] [V.R.P]]
  23. [[`__IBMCPP__`] [V.R.P]]
  24. ]
  25. */
  26. #define BOOST_COMP_IBM BOOST_VERSION_NUMBER_NOT_AVAILABLE
  27. #if defined(__IBMCPP__) || defined(__xlC__) || defined(__xlc__)
  28. # undef BOOST_COMP_IBM
  29. # if !defined(BOOST_COMP_IBM) && defined(__COMPILER_VER__)
  30. # define BOOST_COMP_IBM BOOST_PREDEF_MAKE_0X_VRRPPPP(__COMPILER_VER__)
  31. # endif
  32. # if !defined(BOOST_COMP_IBM) && defined(__xlC__)
  33. # define BOOST_COMP_IBM BOOST_PREDEF_MAKE_0X_VVRR(__xlC__)
  34. # endif
  35. # if !defined(BOOST_COMP_IBM) && defined(__xlc__)
  36. # define BOOST_COMP_IBM BOOST_PREDEF_MAKE_0X_VVRR(__xlc__)
  37. # endif
  38. # if !defined(BOOST_COMP_IBM)
  39. # define BOOST_COMP_IBM BOOST_PREDEF_MAKE_10_VRP(__IBMCPP__)
  40. # endif
  41. #endif
  42. #if BOOST_COMP_IBM
  43. # define BOOST_COMP_IBM_AVAILABLE
  44. #endif
  45. #define BOOST_COMP_IBM_NAME "IBM XL C/C++"
  46. #include <boost/predef/detail/test.h>
  47. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IBM,BOOST_COMP_IBM_NAME)
  48. #endif