c++ - C Macro definition to determine big endian or little endian machine? - Stack Overflow
Is there a one line macro definition to determine the endianness of the machine. I am using the following code but converting it to macro would be too long. ... You can't portably determine endianness with the C preprocessor alone. You also want 0 instead...