Re: Endian/__BYTE_ORDER question

2010-02-12 Thread Geert Uytterhoeven
On Fri, 12 Feb 2010, Joakim Tjernlund wrote: > Wolfgang Denk wrote on 2010/02/11 22:39:00: > > Dear Joakim Tjernlund, > > > > In message > 005cf...@transmode.se> you wrote: > > > > > > > I have no idea how it is actually done in the kernel code... but gcc > > > > defines it: > > > > > > > > gcc -

Re: Endian/__BYTE_ORDER question

2010-02-12 Thread Joakim Tjernlund
ge...@sonytel.be wrote on 2010/02/12 11:33:02: > > On Fri, 12 Feb 2010, Joakim Tjernlund wrote: > > Wolfgang Denk wrote on 2010/02/11 22:39:00: > > > Dear Joakim Tjernlund, > > > > > > In message > > 005cf...@transmode.se> you wrote: > > > > > > > > > I have no idea how it is actually done in the

Re: Endian/__BYTE_ORDER question

2010-02-11 Thread Joakim Tjernlund
Wolfgang Denk wrote on 2010/02/11 22:39:00: > > Dear Joakim Tjernlund, > > In message 005cf...@transmode.se> you wrote: > > > > > I have no idea how it is actually done in the kernel code... but gcc > > > defines it: > > > > > > gcc -dM -E -x c - <<<'' | grep ENDIAN > > > #define __BIG_ENDIAN__ 1

Re: Endian/__BYTE_ORDER question

2010-02-11 Thread Wolfgang Denk
Dear Joakim Tjernlund, In message you wrote: > > > I have no idea how it is actually done in the kernel code... but gcc > > defines it: > > > > gcc -dM -E -x c - <<<'' | grep ENDIAN > > #define __BIG_ENDIAN__ 1 > > #define _BIG_ENDIAN 1 > > That doesn't define __BYTE_ORDER. Try the same gcc co

Re: Endian/__BYTE_ORDER question

2010-02-11 Thread Joakim Tjernlund
Adrian Reber wrote on 2010/02/11 17:33:29: > > On Thu, Feb 11, 2010 at 05:17:37PM +0100, Joakim Tjernlund wrote: > > I am getting confused about on how to test for Endian in the kernel code. > > In user > > space one uses #if __BYTE_ORDER == __LITTLE_ENDIAN or #if __BYTE_ORDER == > > __BIG_ENDIA

Re: Endian/__BYTE_ORDER question

2010-02-11 Thread Joakim Tjernlund
Andreas Schwab wrote on 2010/02/11 17:35:54: > > Joakim Tjernlund writes: > > > I am getting confused about on how to test for Endian in the kernel code. > > In user > > space one uses #if __BYTE_ORDER == __LITTLE_ENDIAN or #if __BYTE_ORDER == > > __BIG_ENDIAN > > > > I can see lots of kernel h

Re: Endian/__BYTE_ORDER question

2010-02-11 Thread Adrian Reber
On Thu, Feb 11, 2010 at 05:17:37PM +0100, Joakim Tjernlund wrote: > I am getting confused about on how to test for Endian in the kernel code. In > user > space one uses #if __BYTE_ORDER == __LITTLE_ENDIAN or #if __BYTE_ORDER == > __BIG_ENDIAN > > I can see lots of kernel headers using this test

Re: Endian/__BYTE_ORDER question

2010-02-11 Thread Andreas Schwab
Joakim Tjernlund writes: > I am getting confused about on how to test for Endian in the kernel code. In > user > space one uses #if __BYTE_ORDER == __LITTLE_ENDIAN or #if __BYTE_ORDER == > __BIG_ENDIAN > > I can see lots of kernel headers using this test too Only outside of __KERNEL__. Andrea

Re: Endian/__BYTE_ORDER question

2010-02-11 Thread Joakim Tjernlund
> > I am getting confused about on how to test for Endian in the kernel code. In > user > space one uses #if __BYTE_ORDER == __LITTLE_ENDIAN or #if __BYTE_ORDER == > __BIG_ENDIAN > > I can see lots of kernel headers using this test too, but it doesn't seem > to be an arch specific file #defining

Endian/__BYTE_ORDER question

2010-02-11 Thread Joakim Tjernlund
I am getting confused about on how to test for Endian in the kernel code. In user space one uses #if __BYTE_ORDER == __LITTLE_ENDIAN or #if __BYTE_ORDER == __BIG_ENDIAN I can see lots of kernel headers using this test too, but it doesn't seem to be an arch specific file #defining __BYTE_ORDER.