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 BHO_PREDEF_OS_IOS_H
  9. #define BHO_PREDEF_OS_IOS_H
  10. #include <asio2/bho/predef/version_number.h>
  11. #include <asio2/bho/predef/make.h>
  12. /* tag::reference[]
  13. = `BHO_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 BHO_OS_IOS BHO_VERSION_NUMBER_NOT_AVAILABLE
  25. #if !defined(BHO_PREDEF_DETAIL_OS_DETECTED) && ( \
  26. defined(__APPLE__) && defined(__MACH__) && \
  27. defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) \
  28. )
  29. # undef BHO_OS_IOS
  30. # define BHO_OS_IOS (__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000)
  31. #endif
  32. #if BHO_OS_IOS
  33. # define BHO_OS_IOS_AVAILABLE
  34. # include <asio2/bho/predef/detail/os_detected.h>
  35. #endif
  36. #define BHO_OS_IOS_NAME "iOS"
  37. #endif
  38. #include <asio2/bho/predef/detail/test.h>
  39. BHO_PREDEF_DECLARE_TEST(BHO_OS_IOS,BHO_OS_IOS_NAME)