Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
f4eec7a
)
THRIFT-1341 TProtocol.h endian detection wrong with boost
author
Roger Meier
<roger@apache.org>
Mon, 12 Sep 2011 22:20:11 +0000
(22:20 +0000)
committer
Roger Meier
<roger@apache.org>
Mon, 12 Sep 2011 22:20:11 +0000
(22:20 +0000)
Patch: alexandre parenteau
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@
1169963
13f79535
-47bb-0310-9956-
ffa450edef68
lib/cpp/src/protocol/TProtocol.h
patch
|
blob
|
history
diff --git
a/lib/cpp/src/protocol/TProtocol.h
b/lib/cpp/src/protocol/TProtocol.h
index
6c0a2d0
..
dfd5eb5
100644
(file)
--- a/
lib/cpp/src/protocol/TProtocol.h
+++ b/
lib/cpp/src/protocol/TProtocol.h
@@
-90,9
+90,15
@@
using apache::thrift::transport::TTransport;
# 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