[Boost-bugs] [Boost C++ Libraries] #4323: Detect endianess on iPhoneOS

Subject: [Boost-bugs] [Boost C++ Libraries] #4323: Detect endianess on iPhoneOS
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-09 12:38:20


#4323: Detect endianess on iPhoneOS
------------------------------+---------------------------------------------
 Reporter: fgp@… | Owner:
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: Building Boost
  Version: Boost 1.43.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 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.

 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.

 {{{
 #elif defined (__APPLE__)
 # if defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
 # define BOOST_LITTLE_ENDIAN
 # define BOOST_BYTE_ORDER 1234
 # elif !defined(__LITTLE_ENDIAN__) && defined(__BIG_ENDIAN__)
 # define BOOST_BIG_ENDIAN
 # define BOOST_BYTE_ORDER 4321
 # else
 # error Unknown machine endianness detected.
 # endif
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4323>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC