diff --git a/doc/html/predef/reference/boost_os_operating_system_macros.html b/doc/html/predef/reference/boost_os_operating_system_macros.html
index 40d4950..a0f0beb 100644
--- a/doc/html/predef/reference/boost_os_operating_system_macros.html
+++ b/doc/html/predef/reference/boost_os_operating_system_macros.html
@@ -171,6 +171,44 @@
+
+ Android
+ operating system.
+
+
+
@@ -207,7 +245,7 @@
@@ -341,7 +379,7 @@
@@ -378,7 +416,7 @@
@@ -441,7 +479,7 @@
@@ -492,7 +530,7 @@
@@ -543,7 +581,7 @@
@@ -643,7 +681,7 @@
@@ -681,7 +719,7 @@
@@ -758,7 +796,7 @@
@@ -810,7 +848,7 @@
@@ -886,7 +924,7 @@
@@ -962,7 +1000,7 @@
@@ -1025,7 +1063,7 @@
@@ -1113,7 +1151,7 @@
@@ -1213,7 +1251,7 @@
@@ -1265,7 +1303,45 @@
+
+ Android
+ operating system.
+
+
+
@@ -1302,7 +1378,7 @@
@@ -1340,7 +1416,7 @@
@@ -1378,7 +1454,7 @@
@@ -1430,7 +1506,7 @@
@@ -1542,7 +1618,7 @@
@@ -1942,7 +2018,7 @@
@@ -2076,7 +2152,7 @@
@@ -2113,7 +2189,7 @@
@@ -2176,7 +2252,7 @@
@@ -2227,7 +2303,7 @@
@@ -2278,7 +2354,7 @@
@@ -2378,7 +2454,7 @@
@@ -2416,7 +2492,7 @@
@@ -2493,7 +2569,7 @@
@@ -2545,7 +2621,7 @@
@@ -2621,7 +2697,7 @@
@@ -2697,7 +2773,7 @@
@@ -2760,7 +2836,7 @@
diff --git a/include/boost/predef/endian.h b/include/boost/predef/endian.h
index 374a4e6..f01f674 100644
--- a/include/boost/predef/endian.h
+++ b/include/boost/predef/endian.h
@@ -10,12 +10,35 @@ http://www.boost.org/LICENSE_1_0.txt)
#include
#include
-#include
+#include
/*`
-[heading `BOOST_ENDIAN_BIG_BYTE`, `BOOST_ENDIAN_LITTLE_BYTE`, `BOOST_ENDIAN_BIG_WORD`, `BOOST_ENDIAN_LITTLE_WORD`]
+[heading `BOOST_ENDIAN_*`]
-Detection of endian memory ordering.
+Detection of endian memory ordering. There are four defined macros
+in this header that define the various generally possible endian
+memory orderings:
+
+* `BOOST_ENDIAN_BIG_BYTE`, byte-swapped big-endian.
+* `BOOST_ENDIAN_BIG_WORD`, word-swapped big-endian.
+* `BOOST_ENDIAN_LITTLE_BYTE`, byte-swapped little-endian.
+* `BOOST_ENDIAN_LITTLE_WORD`, word-swapped little-endian.
+
+The detection is conservative in that it only identifies endianness
+that it knows for certain. In particular bi-endianness is not
+indicated as is it not practically possible to determine the
+endianness from anything but an operating system provided
+header. And the currently known headers do not define that
+programatic bi-endianness is available.
+
+This implementation is a compilation of various publicly available
+information and acquired knowledge:
+
+# The indispensable documentation of "Pre-defined Compiler Macros"
+ [@http://sourceforge.net/p/predef/wiki/Endianness Endianness].
+# The various endian specifications available in the
+ [@http://wikipedia.org/ Wikipedia] computer architecture pages.
+# Generally available searches for headers that define endianness.
*/
#define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_NOT_AVAILABLE
@@ -23,62 +46,70 @@ Detection of endian memory ordering.
#define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_NOT_AVAILABLE
#define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_NOT_AVAILABLE
-/* GNU libc provides a header defining __BYT_ORDER. */
-#if BOOST_LIB_C_GNU
-# include
-#endif
-
-/* GNU libc style __BYTE_ORDER macros. */
-#if defined(__BYTE_ORDER)
-# if (__BYTE_ORDER == __BIG_ENDIAN)
-# undef BOOST_ENDIAN_BIG_BYTE
-# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
+/* GNU libc provides a header defining __BYTE_ORDER, or _BYTE_ORDER.
+ */
+#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \
+ !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD
+# if BOOST_LIB_C_GNU
+# include
# endif
-# if (__BYTE_ORDER == __LITTLE_ENDIAN)
-# undef BOOST_ENDIAN_LITTLE_BYTE
-# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
-# endif
-# if (__BYTE_ORDER == __PDP_ENDIAN)
-# undef BOOST_ENDIAN_LITTLE_WORD
-# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE
+# if defined(__BYTE_ORDER)
+# if (__BYTE_ORDER == __BIG_ENDIAN)
+# undef BOOST_ENDIAN_BIG_BYTE
+# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
+# endif
+# if (__BYTE_ORDER == __LITTLE_ENDIAN)
+# undef BOOST_ENDIAN_LITTLE_BYTE
+# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
+# endif
+# if (__BYTE_ORDER == __PDP_ENDIAN)
+# undef BOOST_ENDIAN_LITTLE_WORD
+# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE
+# endif
# endif
#endif
-/* Built-in byte-swpped big-endian macros. */
-#if !BOOST_ENDIAN_BIG_BYTE
-# if defined(__BIG_ENDIAN__) || \
- defined(__ARMEB__) || \
- defined(__THUMBEB__) || \
- defined(__AARCH64EB__) || \
- defined(_MIPSEB) || \
- defined(__MIPSEB) || \
- defined(__MIPSEB__)
-# undef BOOST_ENDIAN_BIG_BYTE
-# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
+/* Built-in byte-swpped big-endian macros.
+ */
+#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \
+ !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD
+# if !BOOST_ENDIAN_BIG_BYTE
+# if defined(__BIG_ENDIAN__) || \
+ defined(__ARMEB__) || \
+ defined(__THUMBEB__) || \
+ defined(__AARCH64EB__) || \
+ defined(_MIPSEB) || \
+ defined(__MIPSEB) || \
+ defined(__MIPSEB__)
+# undef BOOST_ENDIAN_BIG_BYTE
+# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
+# endif
# endif
#endif
-/* Built-in byte-swapped little-endian macros. */
-#if !BOOST_ENDIAN_LITTLE_BYTE
-# if defined(__LITTLE_ENDIAN__) || \
- defined(__ARMEL__) || \
- defined(__THUMBEL__) || \
- defined(__AARCH64EL__) || \
- defined(_MIPSEL) || \
- defined(__MIPSEL) || \
- defined(__MIPSEL__)
-# undef BOOST_ENDIAN_LITTLE_BYTE
-# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
+/* Built-in byte-swpped little-endian macros.
+ */
+#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \
+ !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD
+# if !BOOST_ENDIAN_LITTLE_BYTE
+# if defined(__LITTLE_ENDIAN__) || \
+ defined(__ARMEL__) || \
+ defined(__THUMBEL__) || \
+ defined(__AARCH64EL__) || \
+ defined(_MIPSEL) || \
+ defined(__MIPSEL) || \
+ defined(__MIPSEL__)
+# undef BOOST_ENDIAN_LITTLE_BYTE
+# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
+# endif
# endif
#endif
/* Some architectures are strictly one endianess (as opposed
* the current common bi-endianess).
*/
-#if !BOOST_ENDIAN_BIG_BYTE && \
- !BOOST_ENDIAN_BIG_WORD && \
- !BOOST_ENDIAN_LITTLE_BYTE && \
- !BOOST_ENDIAN_LITTLE_WORD
+#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \
+ !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD
# include
# if BOOST_ARCH_M68K || \
BOOST_ARCH_PARISK || \
@@ -99,13 +130,13 @@ Detection of endian memory ordering.
#if BOOST_ENDIAN_BIG_BYTE
# define BOOST_ENDIAN_BIG_BYTE_AVAILABLE
#endif
-#if BOOST_ENDIAN_BIG_WORD_BYTE
+#if BOOST_ENDIAN_BIG_WORD
# define BOOST_ENDIAN_BIG_WORD_BYTE_AVAILABLE
#endif
#if BOOST_ENDIAN_LITTLE_BYTE
# define BOOST_ENDIAN_LITTLE_BYTE_AVAILABLE
#endif
-#if BOOST_ENDIAN_LITTLE_WORD_BYTE
+#if BOOST_ENDIAN_LITTLE_WORD
# define BOOST_ENDIAN_LITTLE_WORD_BYTE_AVAILABLE
#endif
diff --git a/include/boost/predef/os.h b/include/boost/predef/os.h
index 64edab2..942fee6 100644
--- a/include/boost/predef/os.h
+++ b/include/boost/predef/os.h
@@ -10,6 +10,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#include
#include
+#include
#include
#include
#include
diff --git a/include/boost/predef/os/android.h b/include/boost/predef/os/android.h
new file mode 100644
index 0000000..b026abc
--- /dev/null
+++ b/include/boost/predef/os/android.h
@@ -0,0 +1,43 @@
+/*
+Copyright Redshift Software, Inc. 2013
+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_ADROID_H
+#define BOOST_PREDEF_OS_ADROID_H
+
+#include
+#include
+
+/*`
+[heading `BOOST_OS_ANDROID`]
+
+[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] operating system.
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`__ANDROID__`] [__predef_detection__]]
+ ]
+ */
+
+#define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+#if defined(__ANDROID__)
+# undef BOOST_OS_ANDROID
+# define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_AVAILABLE
+#endif
+
+#if BOOST_OS_ANDROID
+# define BOOST_OS_ANDROID_AVAILABLE
+#endif
+
+#define BOOST_OS_ANDROID_NAME "Android"
+
+#include
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_ANDROID,BOOST_OS_ANDROID_NAME)
+
+
+#endif