[Boost-bugs] [Boost C++ Libraries] #1922: endian.hpp may select a wrong endian for NetBSD

Subject: [Boost-bugs] [Boost C++ Libraries] #1922: endian.hpp may select a wrong endian for NetBSD
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-05-16 15:00:06


#1922: endian.hpp may select a wrong endian for NetBSD
---------------------------------------------------------------+------------
 Reporter: Takeshi Mouri <takeshi.mouri.net_at_[hidden]> | Type: Bugs
   Status: new | Milestone: Boost 1.36.0
Component: None | Version: Boost 1.35.0
 Severity: Problem | Keywords:
---------------------------------------------------------------+------------
 In <boost/detail/endian.hpp>:
 {{{
 #elif defined(_BIG_ENDIAN)
 # define BOOST_BIG_ENDIAN
 # define BOOST_BYTE_ORDER 4321
 #elif defined(_LITTLE_ENDIAN)
 # define BOOST_LITTLE_ENDIAN
 # define BOOST_BYTE_ORDER 1234
 }}}
 But, the system header <sys/endian.h> on NetBSD always defines
 _LITTLE_ENDIAN, _BIG_ENDIAN and _PDP_ENDIAN.
 So BOOST_BIG_ENDIAN is defined on little endian platforms.


 Please change it as follow:
 {{{
 #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
 # define BOOST_BIG_ENDIAN
 # define BOOST_BYTE_ORDER 4321
 #elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
 # define BOOST_LITTLE_ENDIAN
 # define BOOST_BYTE_ORDER 1234
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1922>
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:49:57 UTC