From c38f29ce561a5c79a82c1c60c34ef88b5ded0660 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Sat, 23 Aug 2014 14:27:44 +0200 Subject: system/ByteOrder: is a non-standard header that only Linux provides. --- src/system/ByteOrder.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/system') diff --git a/src/system/ByteOrder.hxx b/src/system/ByteOrder.hxx index 8beda61c7..42181fe2c 100644 --- a/src/system/ByteOrder.hxx +++ b/src/system/ByteOrder.hxx @@ -40,6 +40,16 @@ /* well-known big-endian */ # define IS_LITTLE_ENDIAN false # define IS_BIG_ENDIAN true +#elif defined(__APPLE__) +/* compile-time check for MacOS */ +# include +# if BYTE_ORDER == LITTLE_ENDIAN +# define IS_LITTLE_ENDIAN true +# define IS_BIG_ENDIAN false +# else +# define IS_LITTLE_ENDIAN false +# define IS_BIG_ENDIAN true +# endif #else /* generic compile-time check */ # include -- cgit v1.2.3