summaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/endian.h
Commit message (Collapse)AuthorAgeFilesLines
* Fixing build on Mac OSXBeshr Al Nahas2016-05-281-1/+1
| | | | | | | | | Fix minor syntax error Change-Id: I67f9a1e41fa5b1da3a4b10fc76138e153b767241 Reviewed-on: https://gerrit.osmocom.org/125 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
* Fix build for OSXArran Cudbard-Bell2016-05-201-0/+11
| | | | | | | Change-Id: I580a500edcf4812e570be586890abef746083a8c Reviewed-on: https://gerrit.osmocom.org/74 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
* endian: Be able to detect endian on GNU and BSDHolger Hans Peter Freyther2015-03-221-0/+38
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