From: Andrew Morton <akpm@linux-foundation.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [RFC] #define __BYTE_ORDER
Date: Wed, 24 Mar 2010 11:51:12 -0700 [thread overview]
Message-ID: <20100324115112.07ce4807.akpm@linux-foundation.org> (raw)
In-Reply-To: <10f740e81003241137y382d155fnb777344d3af25f03@mail.gmail.com>
On Wed, 24 Mar 2010 19:37:36 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Wed, Mar 24, 2010 at 19:21, Andrew Morton <akpm@linux-foundation.org> wrote:
> > On Wed, 17 Mar 2010 19:10:55 +0100
> > Joakim Tjernlund <Joakim.Tjernlund@transmode.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.
umph. We don't _have_ to copy userspace, and removing __BYTE_ORDER
altogether makes the kernel cleaner and simpler.
But if we did that, we shouldn't have used the same symbols as
userspace. Sigh.
next prev parent reply other threads:[~2010-03-24 18:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 18:10 [PATCH] [RFC] #define __BYTE_ORDER Joakim Tjernlund
2010-03-24 18:21 ` Andrew Morton
2010-03-24 18:37 ` Geert Uytterhoeven
2010-03-24 18:51 ` Andrew Morton [this message]
2010-03-24 18:53 ` David Daney
2010-03-24 21:55 ` Joakim Tjernlund
2010-03-24 21:45 ` Joakim Tjernlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100324115112.07ce4807.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Joakim.Tjernlund@transmode.se \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox