Re: Byteorder conditional compilation problems

From: Linus Torvalds
Date: Wed Mar 06 2013 - 12:37:52 EST


On Wed, Mar 6, 2013 at 8:43 AM, David Howells <dhowells@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/