macos.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. /*`
  19. [heading `BOOST_OS_MACOS`]
  20. [@http://en.wikipedia.org/wiki/Mac_OS Mac OS] operating system.
  21. [table
  22. [[__predef_symbol__] [__predef_version__]]
  23. [[`macintosh`] [__predef_detection__]]
  24. [[`Macintosh`] [__predef_detection__]]
  25. [[`__APPLE__`] [__predef_detection__]]
  26. [[`__MACH__`] [__predef_detection__]]
  27. [[`__APPLE__`, `__MACH__`] [10.0.0]]
  28. [[ /otherwise/ ] [9.0.0]]
  29. ]
  30. */
  31. #define BOOST_OS_MACOS BOOST_VERSION_NUMBER_NOT_AVAILABLE
  32. #if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
  33. defined(macintosh) || defined(Macintosh) || \
  34. (defined(__APPLE__) && defined(__MACH__)) \
  35. )
  36. # undef BOOST_OS_MACOS
  37. # if !defined(BOOST_OS_MACOS) && defined(__APPLE__) && defined(__MACH__)
  38. # define BOOST_OS_MACOS BOOST_VERSION_NUMBER(10,0,0)
  39. # endif
  40. # if !defined(BOOST_OS_MACOS)
  41. # define BOOST_OS_MACOS BOOST_VERSION_NUMBER(9,0,0)
  42. # endif
  43. #endif
  44. #if BOOST_OS_MACOS
  45. # define BOOST_OS_MACOS_AVAILABLE
  46. # include <boost/predef/detail/os_detected.h>
  47. #endif
  48. #define BOOST_OS_MACOS_NAME "Mac OS"
  49. #endif
  50. #include <boost/predef/detail/test.h>
  51. BOOST_PREDEF_DECLARE_TEST(BOOST_OS_MACOS,BOOST_OS_MACOS_NAME)