Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: >>> And since Solaris defines _BYTE_ORDER we never get to checking __sparc, >>> and in fact the "/* byte order is bendian */" test errors out. >>> ... >> Well, if Solaris defines _BYTE_ORDER, doesn't that mean they define >> two constants _BIG_ENDIAN and _LITTLE_ENDIAN to compare it with? > > No, under gcc/clang & glibc you're expected to compare them. Under > Solaris it's just defined(_BIG_ENDIAN), but as explained in another > comment this whole thing actually turns out to be not needed, on Solaris > it's sufficient that we fall through and check __sparc. Huh. It makes me wonder what we are expected to use _BYTE_ORDER on Solaris for, then, if it defines _BIG_ENDIAN and _BYTE_ORDER, and still wants us to use the definedness of _BIG_ENDIAN. It does not make any sense. But if we can use __sparc and fold it into various arm/mipts bits, that is much simpler ;-)