Boost C++ Libraries: Ticket #4323: Detect endianess on iPhoneOS https://svn.boost.org/trac10/ticket/4323 <p> The detail/endian.hpp detection logic fails on iPhoneOS currently (as of boost 1.43). The following block fixes that. If've added this right after the GLIBC specific checks, but if one wants to be absolutely sure that no currently working case is broken by this, it might make sense to add it at the end. </p> <p> All apple-supplied compilers on my Mac OS 10.6 installation (gcc 4.0, gcc-4.2, llvm-gcc, clang) set those defines, though, as doe the corresponding iPhoneOS versions of these compilers. The risk of adding this right after the GLIBc block seems pretty small therefore. </p> <pre class="wiki">#elif defined (__APPLE__) # if defined(__LITTLE_ENDIAN__) &amp;&amp; !defined(__BIG_ENDIAN__) # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 # elif !defined(__LITTLE_ENDIAN__) &amp;&amp; defined(__BIG_ENDIAN__) # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 # else # error Unknown machine endianness detected. # endif </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4323 Trac 1.4.3 Steven Watanabe Wed, 09 Jun 2010 15:53:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4323#comment:1 https://svn.boost.org/trac10/ticket/4323#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicates <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2762" title="#2762: Bugs: impossible to build boost 1.38 for iphone (closed: fixed)">#2762</a>. This has already been fixed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/62252" title="Add detection of __LITTLE/BIG_ENDIAN__ for GCC versions that define ...">[62252]</a>. </p> Ticket