path: root/include/Makefile.am
diff options
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 /include/Makefile.am
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 'include/Makefile.am')
1 files changed, 1 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 347f641a..181431b7 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -14,6 +14,7 @@ nobase_include_HEADERS = \
osmocom/core/crc64gen.h \
osmocom/core/crc8gen.h \
osmocom/core/crcgen.h \
+ osmocom/core/endian.h \
osmocom/core/defs.h \
osmocom/core/gsmtap.h \
osmocom/core/gsmtap_util.h \