Linus Torvalds <torvalds@linux-foundation.org> wrote on 2010/05/26 18:46:11:
Ouch! But here -Wundef really helps.
In the kernel it is since it breaks the compile. The breakage
my patch introduced is a sign of that, right?
Not in general, but my case could have been avoided, I sure there are others
too. Why else does some header files bother with __BYTE_ORDER?
hmm, so then I guess the existing use of __BYTE_ORDER in the
kernel should be removed?
CONFIG_BIG_ENDIAN would have helped me with my lib/crc32.c problem
but it does not prevent silent breakage so I figured the glibc model
would be better.
Is it such a big difference, readability wise, between
#ifdef CONFIG_BIG_ENDIAN
and
#if __BYTE_ORDER == __BIG_ENDIAN
that you rather risk silent breakage?
Such arch exists but does any of them run linux in both modes?
Jocke
--