Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7528: Compilation failure on Android and Xbox 360
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-18 11:29:26
#7528: Compilation failure on Android and Xbox 360
-------------------------------+--------------------------------------------
Reporter: psiha | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: config
Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------
Description changed by psiha:
Old description:
> boost/detail/endian.hpp fails to autodetect endianess for Android and
> Xbox so __LITTLE_ENDIAN__ or __BIG_ENDIAN__ (respectively) has to be
> manually defined before anything includes that header.
> Alternatively, a more elaborate approach can be used:
> #if defined( __ANDROID__ )
> // http://stackoverflow.com/questions/6212951/endianness-of-android-
> ndk
> #include "machine/_types.h"
> #ifdef __ARMEB__
> #define __BIG_ENDIAN__
> #else
> #define __LITTLE_ENDIAN__
> #endif // __ARMEB__
> #elif defined( _XBOX ) && !defined( __BIG_ENDIAN__ )
> #define __BIG_ENDIAN__
> #endif // platform
New description:
boost/detail/endian.hpp fails to autodetect endianess for Android and Xbox
so __LITTLE_ENDIAN__ or __BIG_ENDIAN__ (respectively) has to be manually
defined before anything includes that header.
Alternatively, a more elaborate approach can be used:
{{{
#if defined( __ANDROID__ )
// http://stackoverflow.com/questions/6212951/endianness-of-
android-ndk
#include "machine/_types.h"
#ifdef __ARMEB__
#define __BIG_ENDIAN__
#else
#define __LITTLE_ENDIAN__
#endif // __ARMEB__
#elif defined( _XBOX ) && !defined( __BIG_ENDIAN__ )
#define __BIG_ENDIAN__
#endif // platform
}}}
-- -- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7528#comment:1> 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:10 UTC