macos.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. Copyright Rene Rivera 2008-2015
  3. Copyright Franz Detro 2014
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENSE_1_0.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. */
  8. #ifndef BOOST_PREDEF_OS_MACOS_H
  9. #define BOOST_PREDEF_OS_MACOS_H
  10. /* Special case: iOS will define the same predefs as MacOS, and additionally
  11. '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__'. We can guard against that,
  12. but only if we detect iOS first. Hence we will force include iOS detection
  13. * before doing any MacOS detection.
  14. */
  15. #include <boost/predef/os/ios.h>
  16. #include <boost/predef/version_number.h>
  17. #include <boost/predef/make.h>
  18. /* tag::reference[]
  19. = `BOOST_OS_MACOS`
  20. http://en.wikipedia.org/wiki/Mac_OS[Mac OS] operating system.
  21. [options="header"]
  22. |===
  23. | {predef_symbol} | {predef_version}
  24. | `macintosh` | {predef_detection}
  25. | `Macintosh` | {predef_detection}
  26. | `+__APPLE__+` | {predef_detection}
  27. | `+__MACH__+` | {predef_detection}
  28. | `+__APPLE__+`, `+__MACH__+` | 10.0.0
  29. | `_otherwise_` | 9.0.0
  30. |===
  31. */ // end::reference[]
  32. #define BOOST_OS_MACOS BOOST_VERSION_NUMBER_NOT_AVAILABLE
  33. #if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
  34. defined(macintosh) || defined(Macintosh) || \
  35. (defined(__APPLE__) && defined(__MACH__)) \
  36. )
  37. # undef BOOST_OS_MACOS
  38. # if !defined(BOOST_OS_MACOS) && defined(__APPLE__) && defined(__MACH__)
  39. # define BOOST_OS_MACOS BOOST_VERSION_NUMBER(10,0,0)
  40. # endif
  41. # if !defined(BOOST_OS_MACOS)
  42. # define BOOST_OS_MACOS BOOST_VERSION_NUMBER(9,0,0)
  43. # endif
  44. #endif
  45. #if BOOST_OS_MACOS
  46. # define BOOST_OS_MACOS_AVAILABLE
  47. # include <boost/predef/detail/os_detected.h>
  48. #endif
  49. #define BOOST_OS_MACOS_NAME "Mac OS"
  50. #endif
  51. #include <boost/predef/detail/test.h>
  52. BOOST_PREDEF_DECLARE_TEST(BOOST_OS_MACOS,BOOST_OS_MACOS_NAME)