ios.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. Copyright Franz Detro 2014
  3. Copyright Rene Rivera 2015
  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_IOS_H
  9. #define BOOST_PREDEF_OS_IOS_H
  10. #include <boost/predef/version_number.h>
  11. #include <boost/predef/make.h>
  12. /* tag::reference[]
  13. = `BOOST_OS_IOS`
  14. http://en.wikipedia.org/wiki/iOS[iOS] operating system.
  15. [options="header"]
  16. |===
  17. | {predef_symbol} | {predef_version}
  18. | `+__APPLE__+` | {predef_detection}
  19. | `+__MACH__+` | {predef_detection}
  20. | `+__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__+` | {predef_detection}
  21. | `+__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__+` | +__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__+*1000
  22. |===
  23. */ // end::reference[]
  24. #define BOOST_OS_IOS BOOST_VERSION_NUMBER_NOT_AVAILABLE
  25. #if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
  26. defined(__APPLE__) && defined(__MACH__) && \
  27. defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) \
  28. )
  29. # undef BOOST_OS_IOS
  30. # define BOOST_OS_IOS (__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000)
  31. #endif
  32. #if BOOST_OS_IOS
  33. # define BOOST_OS_IOS_AVAILABLE
  34. # include <boost/predef/detail/os_detected.h>
  35. #endif
  36. #define BOOST_OS_IOS_NAME "iOS"
  37. #endif
  38. #include <boost/predef/detail/test.h>
  39. BOOST_PREDEF_DECLARE_TEST(BOOST_OS_IOS,BOOST_OS_IOS_NAME)