diff --git a/include/boost/predef/architecture/arm.h b/include/boost/predef/architecture/arm.h index 4c469a5..7f84111 100644 --- a/include/boost/predef/architecture/arm.h +++ b/include/boost/predef/architecture/arm.h @@ -1,5 +1,6 @@ /* Copyright Rene Rivera 2008-2013 +Copyright Franz Detro 2014 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -20,10 +21,12 @@ http://www.boost.org/LICENSE_1_0.txt) [[__predef_symbol__] [__predef_version__]] [[`__arm__`] [__predef_detection__]] + [[`__arm64`] [__predef_detection__]] [[`__thumb__`] [__predef_detection__]] [[`__TARGET_ARCH_ARM`] [__predef_detection__]] [[`__TARGET_ARCH_THUMB`] [__predef_detection__]] + [[`__arm64`] [8.0.0]] [[`__TARGET_ARCH_ARM`] [V.0.0]] [[`__TARGET_ARCH_THUMB`] [V.0.0]] ] @@ -31,9 +34,12 @@ http://www.boost.org/LICENSE_1_0.txt) #define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE -#if defined(__arm__) || defined(__thumb__) || \ +#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \ defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) # undef BOOST_ARCH_ARM +# if !defined(BOOST_ARCH_ARM) && defined(__arm64) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0) +# endif # if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM) # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0) # endif diff --git a/include/boost/predef/os.h b/include/boost/predef/os.h index 3aceb3a..628eb4f 100644 --- a/include/boost/predef/os.h +++ b/include/boost/predef/os.h @@ -1,5 +1,6 @@ /* Copyright Rene Rivera 2008-2012 +Copyright Franz Detro 2014 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +17,7 @@ http://www.boost.org/LICENSE_1_0.txt) #include #include #include +#include #include #include #include diff --git a/include/boost/predef/os/ios.h b/include/boost/predef/os/ios.h new file mode 100644 index 0000000..97e1bb8 --- /dev/null +++ b/include/boost/predef/os/ios.h @@ -0,0 +1,51 @@ +/* +Copyright Franz Detro 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_IOS_H +#define BOOST_PREDEF_OS_IOS_H + +#include +#include + +/*` +[heading `BOOST_OS_IOS`] + +[@http://en.wikipedia.org/wiki/iOS iOS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__APPLE__`] [__predef_detection__]] + [[`__MACH__`] [__predef_detection__]] + [[`__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__`] [__predef_detection__]] + + [[`__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__`] [__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000]] + ] + */ + +#define BOOST_OS_IOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ + defined(__APPLE__) && defined(__MACH__) && \ + defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) \ + ) +# undef BOOST_OS_IOS +# define BOOST_OS_IOS (__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000) +#endif + +#if BOOST_OS_IOS +# define BOOST_OS_IOS_AVAILABLE +# include +#endif + +#define BOOST_OS_IOS_NAME "iOS" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_IOS,BOOST_OS_IOS_NAME) + + +#endif diff --git a/include/boost/predef/os/macos.h b/include/boost/predef/os/macos.h index f71ddfb..9fd8d2a 100644 --- a/include/boost/predef/os/macos.h +++ b/include/boost/predef/os/macos.h @@ -1,5 +1,6 @@ /* Copyright Rene Rivera 2008-2013 +Copyright Franz Detro 2014 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,6 +9,13 @@ http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PREDEF_OS_MACOS_H #define BOOST_PREDEF_OS_MACOS_H +/* Special case: iOS will define the same predefs as MacOS, and additionally + '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__'. We can guard against that, + but only if we detect iOS first. Hence we will force include iOS detection + * before doing any MacOS detection. + */ +#include + #include #include