[
https://issues.apache.org/jira/browse/THRIFT-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13679005#comment-13679005
]
Jens Geyer commented on THRIFT-773:
-----------------------------------
Hi [~nova77],
could you give some feedback on this ticket so we can resolve this issue?
Thank you!
> Endianness is wrong if <endian.h> header is not available
> ---------------------------------------------------------
>
> Key: THRIFT-773
> URL: https://issues.apache.org/jira/browse/THRIFT-773
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Compiler
> Affects Versions: 0.2
> Reporter: Norman Casagrande
> Labels: endianness, thrift, tprotocol
> Attachments: protocol_endian.patch
>
>
> TProtocol expects the header <endian.h> to be available, otherwise it relies
> on <boost/config.hpp>, but
> * boost/config does not define endianness, that's done by
> <boost/detail/endian.hpp>
> * even if it was, boost only defines the macro depending on the type (so
> either BOOST_LITTLE_ENDIAN or BOOST_BIG_ENDIAN) and does not, as in
> <endian.h> set a value.
> As result, if <endian.h> is not available, the code always uses big
> endianness.
> The simplest solution is to include the right header and define those values
> using the information boost provides.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira