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).
This commit is contained in:
Rene Rivera
2014-12-29 23:20:36 -06:00
parent ce0959ba62
commit 5912dd7e62
5 changed files with 21 additions and 14 deletions

View File

@ -27,10 +27,10 @@
This library would be an incoherent mess if it weren't for Boost community 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 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, into a useable form. In particular I would like to thank: Mathias Gaunard,
Robert Stewart, Jo��l Lamotte, Lars Viklund, Nathan Ridge, Artyom Beilis, Robert Stewart, Joël Lamotte, Lars Viklund, Nathan Ridge, Artyom Beilis, Joshua
Joshua Boyce, Gottlob Frege, Thomas Heller, Edward Diener, Dave Abrahams, Iain Boyce, Gottlob Frege, Thomas Heller, Edward Diener, Dave Abrahams, Iain Denniston,
Denniston, Dan Price, Ioannis Papadopoulos, and Robert Ramey. And thanks to Dan Price, Ioannis Papadopoulos, and Robert Ramey. And thanks to Joel Falcou
Joel Falcou for managing the review of this library. for managing the review of this library.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

View File

@ -17,9 +17,14 @@
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="predef.to_do"></a><a class="link" href="to_do.html" title="To Do">To Do</a> <a name="predef.to_do"></a><a class="link" href="to_do.html" title="To Do">To Do</a>
</h2></div></div></div> </h2></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Improve reference documentation. Improve reference documentation.
</li></ul></div> </li>
<li class="listitem">
Provide BOOST_WORKAROUND style macros for public use.
</li>
</ul></div>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>

View File

@ -576,7 +576,7 @@ This library would be an incoherent mess if it weren't for
Boost community that provided invaluable feedback for the Boost community that provided invaluable feedback for the
eight years that it took to polish into a useable form. eight years that it took to polish into a useable form.
In particular I would like to thank: Mathias Gaunard, In particular I would like to thank: Mathias Gaunard,
Robert Stewart, Jo<EFBFBD><EFBFBD>l Lamotte, Lars Viklund, Nathan Ridge, Robert Stewart, Joël Lamotte, Lars Viklund, Nathan Ridge,
Artyom Beilis, Joshua Boyce, Gottlob Frege, Thomas Heller, Artyom Beilis, Joshua Boyce, Gottlob Frege, Thomas Heller,
Edward Diener, Dave Abrahams, Iain Denniston, Dan Price, Edward Diener, Dave Abrahams, Iain Denniston, Dan Price,
Ioannis Papadopoulos, and Robert Ramey. And thanks to Ioannis Papadopoulos, and Robert Ramey. And thanks to

View File

@ -8,5 +8,6 @@ http://www.boost.org/LICENSE_1_0.txt)
[section To Do] [section To Do]
* Improve reference documentation. * Improve reference documentation.
* Provide BOOST_WORKAROUND style macros for public use.
[endsect] [endsect]

View File

@ -13,6 +13,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#include <boost/predef/library/c/gnu.h> #include <boost/predef/library/c/gnu.h>
#include <boost/predef/os/macos.h> #include <boost/predef/os/macos.h>
#include <boost/predef/os/bsd.h> #include <boost/predef/os/bsd.h>
#include <boost/predef/os/android.h>
/*` /*`
[heading `BOOST_ENDIAN_*`] [heading `BOOST_ENDIAN_*`]
@ -53,7 +54,7 @@ information and acquired knowledge:
*/ */
#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ #if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \
!BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD
# if BOOST_LIB_C_GNU # if BOOST_LIB_C_GNU || BOOST_OS_ANDROID
# include <endian.h> # include <endian.h>
# else # else
# if BOOST_OS_MACOS # if BOOST_OS_MACOS
@ -69,29 +70,29 @@ information and acquired knowledge:
# endif # endif
# endif # endif
# if defined(__BYTE_ORDER) # if defined(__BYTE_ORDER)
# if (__BYTE_ORDER == __BIG_ENDIAN) # if defined(__BIG_ENDIAN) && (__BYTE_ORDER == __BIG_ENDIAN)
# undef BOOST_ENDIAN_BIG_BYTE # undef BOOST_ENDIAN_BIG_BYTE
# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
# endif # endif
# if (__BYTE_ORDER == __LITTLE_ENDIAN) # if defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN)
# undef BOOST_ENDIAN_LITTLE_BYTE # undef BOOST_ENDIAN_LITTLE_BYTE
# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
# endif # endif
# if (__BYTE_ORDER == __PDP_ENDIAN) # if defined(__PDP_ENDIAN) && (__BYTE_ORDER == __PDP_ENDIAN)
# undef BOOST_ENDIAN_LITTLE_WORD # undef BOOST_ENDIAN_LITTLE_WORD
# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE
# endif # endif
# endif # endif
# if !defined(__BYTE_ORDER) && defined(_BYTE_ORDER) # 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 # undef BOOST_ENDIAN_BIG_BYTE
# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
# endif # endif
# if (_BYTE_ORDER == _LITTLE_ENDIAN) # if defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN)
# undef BOOST_ENDIAN_LITTLE_BYTE # undef BOOST_ENDIAN_LITTLE_BYTE
# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
# endif # endif
# if (_BYTE_ORDER == _PDP_ENDIAN) # if defined(_PDP_ENDIAN) && (_BYTE_ORDER == _PDP_ENDIAN)
# undef BOOST_ENDIAN_LITTLE_WORD # undef BOOST_ENDIAN_LITTLE_WORD
# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE
# endif # endif