determine-endian-bitwidth.c (346B)
1 #include "platform_info.h" 2 3 #if IS_BIG_ENDIAN && IS_64_BIT 4 #error msgbegin --endian big --bitwidth 64 msgend 5 #elif IS_BIG_ENDIAN && !IS_64_BIT 6 #error msgbegin --endian big --bitwidth 32 msgend 7 #elif !IS_BIG_ENDIAN && IS_64_BIT 8 #error msgbegin --endian little --bitwidth 64 msgend 9 #else 10 #error msgbegin --endian little --bitwidth 32 msgend 11 #endif