[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10f740e81003241137y382d155fnb777344d3af25f03@mail.gmail.com>
Date: Wed, 24 Mar 2010 19:37:36 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [RFC] #define __BYTE_ORDER
On Wed, Mar 24, 2010 at 19:21, Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Wed, 17 Mar 2010 19:10:55 +0100
> Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se> wrote:
>
>> Linux does not define __BYTE_ORDER in its endian header files
>> which makes some header files bend backwards to get at the
>> current endian. Lets #define __BYTE_ORDER in big_endian.h/litte_endian.h
>> to make it easier for header files that are used in user space too.
>
> I don't get it. Why not nuke __BYTE_ORDER altogether and do `#ifdef
> __LITTLE_ENDIAN' and `#ifdef __BIG_ENDIAN' everywhere?
Because in userspace the convention is that
1. _both_ __LITTLE_ENDIAN and __BIG_ENDIAN are defined,
2. you have to test for e.g. __BYTE_ORDER == __BIG_ENDIAN.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists