protobuf-c / protobuf-c-rpc

Protocol Buffers C RPC implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Endianess check for convert functions seems not to work properly

axel-he opened this issue · comments

The function uint32_to_le/uint32_to_le shall convert an integer value to little endian or from little endian. But it seems that the endianess check seems a bit weak. When cross compiled for a big endian target, the check mentioned above has not detected the targets big endianess.

#if !defined(WORDS_BIGENDIAN)

#if !defined(WORDS_BIGENDIAN)