endian: Add Glibc like endianess check
authorAkshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Tue, 12 Sep 2017 05:23:13 +0000 (10:53 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 12 Sep 2017 11:01:45 +0000 (20:31 +0930)
commit759ac0f0564104d5028acd47c3e9fdb858c96d1d
tree64ead6a8cb2c39e31a94c8202be62342d83c6169
parent9728f1d9c26e329a13dc66a35b11fafa69ba016d
endian: Add Glibc like endianess check

An application built using glibc would expect __BYTE_ORDER to tell if
it should be compiled for BIG_ENDIAN or LITTLE_ENDIAN, whereas ccan uses
HAVE_LITTLE_ENDIAN and HAVE_BIG_ENDIAN for the same purpose.

Hence setting __BYTE_ORDER based on what CCAN provides will no longer
break the applications which check endianness the glibc way.

Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/endian/endian.h