You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2011/09/13 00:20:11 UTC

svn commit: r1169963 - /thrift/trunk/lib/cpp/src/protocol/TProtocol.h

Author: roger
Date: Mon Sep 12 22:20:11 2011
New Revision: 1169963

URL: http://svn.apache.org/viewvc?rev=1169963&view=rev
Log:
THRIFT-1341 TProtocol.h endian detection wrong with boost
Patch: alexandre parenteau

Modified:
    thrift/trunk/lib/cpp/src/protocol/TProtocol.h

Modified: thrift/trunk/lib/cpp/src/protocol/TProtocol.h
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/cpp/src/protocol/TProtocol.h?rev=1169963&r1=1169962&r2=1169963&view=diff
==============================================================================
--- thrift/trunk/lib/cpp/src/protocol/TProtocol.h (original)
+++ thrift/trunk/lib/cpp/src/protocol/TProtocol.h Mon Sep 12 22:20:11 2011
@@ -90,9 +90,15 @@ using apache::thrift::transport::TTransp
 #  define __BIG_ENDIAN BIG_ENDIAN
 # else
 #  include <boost/config.hpp>
+#  include <boost/detail/endian.hpp>
 #  define __BYTE_ORDER BOOST_BYTE_ORDER
-#  define __LITTLE_ENDIAN BOOST_LITTLE_ENDIAN
-#  define __BIG_ENDIAN BOOST_BIG_ENDIAN
+#  ifdef BOOST_LITTLE_ENDIAN
+#   define __LITTLE_ENDIAN __BYTE_ORDER
+#   define __BIG_ENDIAN 0
+#  else
+#   define __LITTLE_ENDIAN 0
+#   define __BIG_ENDIAN __BYTE_ORDER
+#  endif
 # endif
 #endif