Skip to content

Commit

Permalink
update Byte Order compile-time checks
Browse files Browse the repository at this point in the history
previous version failed on macos-14-arm64
  • Loading branch information
KrisThielemans committed Apr 30, 2024
1 parent 78e29ea commit d77ed9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/include/stir/ByteOrderDefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@
START_NAMESPACE_STIR

// currently checked by asserts()
// partially from https://stackoverflow.com/a/27054190
#if !defined(__alpha) && (!defined(_WIN32) || defined(_M_PPC) || defined(_M_MPPC)) && !defined(__i386__) && !defined(__i486__) \
&& !defined(__i586__) && !defined(__i686__) && !defined(__i786__) && !defined(__i886__) && !defined(__k6__) \
&& !defined(__athlon__) && !defined(__x86_64__) && !defined(__k6__) \
|| (defined(__MSL__) && !defined(__LITTLE_ENDIAN))
|| (defined(__MSL__) && !defined(__LITTLE_ENDIAN)) || (defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN) \
|| (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) /* gcc */) || defined(__BIG_ENDIAN__) \
|| defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || defined(_MIBSEB) || defined(__MIBSEB) \
|| defined(__MIBSEB__)
# define STIRIsNativeByteOrderBigEndian 1
# define STIRIsNativeByteOrderLittleEndian 0
#else
Expand Down

0 comments on commit d77ed9c

Please sign in to comment.