mingw.h 2.2 KB

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