Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62252 - trunk/boost/detail
From: grafikrobot_at_[hidden]
Date: 2010-05-26 17:10:42


Author: grafik
Date: 2010-05-26 17:10:41 EDT (Wed, 26 May 2010)
New Revision: 62252
URL: http://svn.boost.org/trac/boost/changeset/62252

Log:
Add detection of __LITTLE/BIG_ENDIAN__ for GCC versions that define them. I.e. the Apple builds of Xcode/gcc. (fixes #2762)
Text files modified:
   trunk/boost/detail/endian.hpp | 7 +++++--
   1 files changed, 5 insertions(+), 2 deletions(-)

Modified: trunk/boost/detail/endian.hpp
==============================================================================
--- trunk/boost/detail/endian.hpp (original)
+++ trunk/boost/detail/endian.hpp 2010-05-26 17:10:41 EDT (Wed, 26 May 2010)
@@ -1,5 +1,6 @@
 // Copyright 2005 Caleb Epstein
 // Copyright 2006 John Maddock
+// Copyright 2010 Rene Rivera
 // Distributed under the Boost Software License, Version 1.0. (See accompany-
 // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -42,10 +43,12 @@
 # error Unknown machine endianness detected.
 # endif
 # define BOOST_BYTE_ORDER __BYTE_ORDER
-#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
+#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \
+ defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
 # define BOOST_BIG_ENDIAN
 # define BOOST_BYTE_ORDER 4321
-#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
+#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \
+ defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
 # define BOOST_LITTLE_ENDIAN
 # define BOOST_BYTE_ORDER 1234
 #elif defined(__sparc) || defined(__sparc__) \


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk