Messages in this thread | | | Date | Wed, 6 Mar 2013 09:37:35 -0800 | Subject | Re: Byteorder conditional compilation problems | From | Linus Torvalds <> |
| |
On Wed, Mar 6, 2013 at 8:43 AM, David Howells <dhowells@redhat.com> wrote: > > Scripting a change from "defined(__XXX_ENDIAN)" to "(__XXX_ENDIAN==__BYTEORDER)" > should be easy to script.
How about we just make the rule be that we shouldn't test __xyz_ENDIAN at all, and instead always use CONFIG_xyz_ENDIAN, which isn't ambiguous. And then have the exporter of the uapi header files just sed-script that into __xyz_ENDIAN == __BYTEORDER.
The whole __xyz_ENDIAN == __BYTE_ORDER syntax is moronic, and the standard under BSD seems to be single-underscore "_BYTE_ORDER", while glibc uses double underscore __BYTE_ORDER. The whole thing is a f*cking mess, and I really don't want to get the idiotic mess into the kernel any more than I have to.
In fact, I'd prefer to let it just be. Changing it in the kernel to the idiotic and non-standard user mode format is pointless. Just fix up the (few) entries in the uapi header files.
Linus
| |