summaryrefslogtreecommitdiffstats
path: root/tests/bits/bitrev_test.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-03-22 09:03:42 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-03-22 09:03:42 +0100
commit249a81b7ff57d39af843cd267b60c0ce0400ce8d (patch)
treeeefee95a51e4c9ffa2810bb993c074b0097cc6df /tests/bits/bitrev_test.c
parent789334640f2c34e58b9f3a8c19c57ac15bd2ed38 (diff)
endian: Be able to detect endian on GNU and BSD
On GNU __BYTE_ORDER and __LITTLE_ENDIAN is defined and the include is "endian.h" on FreeBSD it is "sys/endian.h" and LITTLE_ENDIAN/_LITTLE_ENDIAN and BYTE_ORDER/_BYTE_ORDER is defined. Create a header file that defines OSMO_IS_LITTLE_ENDIAN and OSMO_IS_BIG_ENDIAN and can be used as #if OSMO_IS_LITTLE_ENDIAN do_little_endian #elif OSMO_IS_BIG_ENDIAN do_big_endian #else #error "Unknown endian" #endif
Diffstat (limited to 'tests/bits/bitrev_test.c')
0 files changed, 0 insertions, 0 deletions