Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7516: Define endianity for ARM
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-09 14:09:28
#7516: Define endianity for ARM
--------------------------------------+-------------------------------------
Reporter: Jan Hudec <bulb@â¦> | Owner: johnmaddock
Type: Patches | Status: closed
Milestone: To Be Determined | Component: None
Version: Boost 1.51.0 | Severity: Problem
Resolution: fixed | Keywords:
--------------------------------------+-------------------------------------
Comment (by anonymous):
this change is not yet in 1.52.0.
since i don't use glibc (first check, which would use endian.h), my armel
device was not detected correctly.
modern gcc's (iirc 4.4+) provide {{{__BYTE_ORDER__}}}
so the code should do the following:
{{{
#if defined(__GNUC__) && defined(__BYTE_ORDER__)
# if __BYTE_ORDER__ == __LITTLE_ENDIAN__
...
#elif defined(__GLIBC__)
#include <endian.h>
#else
... eternally incomplete cpu-specific ifdef hell here
#endif
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7516#comment:5> 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:12 UTC