Opened 12 years ago

Closed 12 years ago

#4323 closed Bugs (duplicate)

Detect endianess on iPhoneOS

Reported by: fgp@… Owned by:
Milestone: To Be Determined Component: Building Boost
Version: Boost 1.43.0 Severity: Problem
Keywords: Cc:

Description

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

Change History (1)

comment:1 by Steven Watanabe, 12 years ago

Resolution: duplicate
Status: newclosed

Duplicates #2762. This has already been fixed in [62252].

Note: See TracTickets for help on using tickets.