From 5912dd7e629f8c713da3db8964a9c436d9eebec1 Mon Sep 17 00:00:00 2001
From: Rene Rivera
Date: Mon, 29 Dec 2014 23:20:36 -0600
Subject: [PATCH] Add Android OS header for endian definition. And some
platforms don't define all of the *BYTE_ORDER *_ENDIAN macros so need to
guard for that case. (Thanks to mstahl@redhat.com for pointing those out).
---
doc/html/predef/acknoledgements.html | 8 ++++----
doc/html/predef/to_do.html | 9 +++++++--
doc/predef.qbk | 2 +-
doc/todo.qbk | 1 +
include/boost/predef/other/endian.h | 15 ++++++++-------
5 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/doc/html/predef/acknoledgements.html b/doc/html/predef/acknoledgements.html
index 90439da..9f73605 100644
--- a/doc/html/predef/acknoledgements.html
+++ b/doc/html/predef/acknoledgements.html
@@ -27,10 +27,10 @@
This library would be an incoherent mess if it weren't for Boost community
that provided invaluable feedback for the eight years that it took to polish
into a useable form. In particular I would like to thank: Mathias Gaunard,
- Robert Stewart, Jo��l Lamotte, Lars Viklund, Nathan Ridge, Artyom Beilis,
- Joshua Boyce, Gottlob Frege, Thomas Heller, Edward Diener, Dave Abrahams, Iain
- Denniston, Dan Price, Ioannis Papadopoulos, and Robert Ramey. And thanks to
- Joel Falcou for managing the review of this library.
+ Robert Stewart, Joël Lamotte, Lars Viklund, Nathan Ridge, Artyom Beilis, Joshua
+ Boyce, Gottlob Frege, Thomas Heller, Edward Diener, Dave Abrahams, Iain Denniston,
+ Dan Price, Ioannis Papadopoulos, and Robert Ramey. And thanks to Joel Falcou
+ for managing the review of this library.
diff --git a/doc/html/predef/to_do.html b/doc/html/predef/to_do.html
index c5f8252..7c01101 100644
--- a/doc/html/predef/to_do.html
+++ b/doc/html/predef/to_do.html
@@ -17,9 +17,14 @@
--
+
+-
Improve reference documentation.
-
+
+-
+ Provide BOOST_WORKAROUND style macros for public use.
+
+
|
diff --git a/doc/predef.qbk b/doc/predef.qbk
index e8b5f9d..4626830 100644
--- a/doc/predef.qbk
+++ b/doc/predef.qbk
@@ -576,7 +576,7 @@ This library would be an incoherent mess if it weren't for
Boost community that provided invaluable feedback for the
eight years that it took to polish into a useable form.
In particular I would like to thank: Mathias Gaunard,
-Robert Stewart, Jo��l Lamotte, Lars Viklund, Nathan Ridge,
+Robert Stewart, Joël Lamotte, Lars Viklund, Nathan Ridge,
Artyom Beilis, Joshua Boyce, Gottlob Frege, Thomas Heller,
Edward Diener, Dave Abrahams, Iain Denniston, Dan Price,
Ioannis Papadopoulos, and Robert Ramey. And thanks to
diff --git a/doc/todo.qbk b/doc/todo.qbk
index 12f7db5..aa1c845 100644
--- a/doc/todo.qbk
+++ b/doc/todo.qbk
@@ -8,5 +8,6 @@ http://www.boost.org/LICENSE_1_0.txt)
[section To Do]
* Improve reference documentation.
+* Provide BOOST_WORKAROUND style macros for public use.
[endsect]
diff --git a/include/boost/predef/other/endian.h b/include/boost/predef/other/endian.h
index fd73364..85a028d 100644
--- a/include/boost/predef/other/endian.h
+++ b/include/boost/predef/other/endian.h
@@ -13,6 +13,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#include
#include
#include
+#include
/*`
[heading `BOOST_ENDIAN_*`]
@@ -53,7 +54,7 @@ information and acquired knowledge:
*/
#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \
!BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD
-# if BOOST_LIB_C_GNU
+# if BOOST_LIB_C_GNU || BOOST_OS_ANDROID
# include
# else
# if BOOST_OS_MACOS
@@ -69,29 +70,29 @@ information and acquired knowledge:
# endif
# endif
# if defined(__BYTE_ORDER)
-# if (__BYTE_ORDER == __BIG_ENDIAN)
+# if defined(__BIG_ENDIAN) && (__BYTE_ORDER == __BIG_ENDIAN)
# undef BOOST_ENDIAN_BIG_BYTE
# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
# endif
-# if (__BYTE_ORDER == __LITTLE_ENDIAN)
+# if defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN)
# undef BOOST_ENDIAN_LITTLE_BYTE
# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
# endif
-# if (__BYTE_ORDER == __PDP_ENDIAN)
+# if defined(__PDP_ENDIAN) && (__BYTE_ORDER == __PDP_ENDIAN)
# undef BOOST_ENDIAN_LITTLE_WORD
# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE
# endif
# endif
# if !defined(__BYTE_ORDER) && defined(_BYTE_ORDER)
-# if (_BYTE_ORDER == _BIG_ENDIAN)
+# if defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN)
# undef BOOST_ENDIAN_BIG_BYTE
# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
# endif
-# if (_BYTE_ORDER == _LITTLE_ENDIAN)
+# if defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN)
# undef BOOST_ENDIAN_LITTLE_BYTE
# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
# endif
-# if (_BYTE_ORDER == _PDP_ENDIAN)
+# if defined(_PDP_ENDIAN) && (_BYTE_ORDER == _PDP_ENDIAN)
# undef BOOST_ENDIAN_LITTLE_WORD
# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE
# endif