mingw.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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_PLAT_MINGW_H
  8. #define BOOST_PREDEF_PLAT_MINGW_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /*`
  12. [heading `BOOST_PLAT_MINGW`]
  13. [@http://en.wikipedia.org/wiki/MinGW MinGW] platform, either variety.
  14. Version number available as major, minor, and patch.
  15. [table
  16. [[__predef_symbol__] [__predef_version__]]
  17. [[`__MINGW32__`] [__predef_detection__]]
  18. [[`__MINGW64__`] [__predef_detection__]]
  19. [[`__MINGW64_VERSION_MAJOR`, `__MINGW64_VERSION_MINOR`] [V.R.0]]
  20. [[`__MINGW32_VERSION_MAJOR`, `__MINGW32_VERSION_MINOR`] [V.R.0]]
  21. ]
  22. */
  23. #define BOOST_PLAT_MINGW BOOST_VERSION_NUMBER_NOT_AVAILABLE
  24. #if defined(__MINGW32__) || defined(__MINGW64__)
  25. # include <_mingw.h>
  26. # if !defined(BOOST_PLAT_MINGW_DETECTION) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR))
  27. # define BOOST_PLAT_MINGW_DETECTION \
  28. BOOST_VERSION_NUMBER(__MINGW64_VERSION_MAJOR,__MINGW64_VERSION_MINOR,0)
  29. # endif
  30. # if !defined(BOOST_PLAT_MINGW_DETECTION) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR))
  31. # define BOOST_PLAT_MINGW_DETECTION \
  32. BOOST_VERSION_NUMBER(__MINGW32_MAJOR_VERSION,__MINGW32_MINOR_VERSION,0)
  33. # endif
  34. # if !defined(BOOST_PLAT_MINGW_DETECTION)
  35. # define BOOST_PLAT_MINGW_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
  36. # endif
  37. #endif
  38. #ifdef BOOST_PLAT_MINGW_DETECTION
  39. # define BOOST_PLAT_MINGW_AVAILABLE
  40. # if defined(BOOST_PREDEF_DETAIL_PLAT_DETECTED)
  41. # define BOOST_PLAT_MINGW_EMULATED BOOST_PLAT_MINGW_DETECTION
  42. # else
  43. # undef BOOST_PLAT_MINGW
  44. # define BOOST_PLAT_MINGW BOOST_PLAT_MINGW_DETECTION
  45. # endif
  46. # include <boost/predef/detail/platform_detected.h>
  47. #endif
  48. #define BOOST_PLAT_MINGW_NAME "MinGW (any variety)"
  49. #endif
  50. #include <boost/predef/detail/test.h>
  51. BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW,BOOST_PLAT_MINGW_NAME)
  52. #ifdef BOOST_PLAT_MINGW_EMULATED
  53. #include <boost/predef/detail/test.h>
  54. BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW_EMULATED,BOOST_PLAT_MINGW_NAME)
  55. #endif