If you want to only rely on the preprocessor, you have to figure out the list of predefined symbols. Preprocessor arithmetics has no concept of addressing.
GCC on Mac defines __LITTLE_ENDIAN__
or __BIG_ENDIAN__
$ gcc -E -dM - < /dev/null |grep ENDIAN
#define __LITTLE_ENDIAN__ 1
Then, you can add more preprocessor conditional directives based on platform detection like #ifdef _WIN32
etc.