Re: endianness guide

2005-02-10 Thread Brad Boyer
On Thu, Feb 10, 2005 at 11:20:13PM -0500, Albert Cahalan wrote: > I guess you must enjoy fixing zillions of apps to work > on PowerPC. This must be exciting and enjoyable work. > Discovering the problems is surely an extra pleasure, > especially when your data gets destroyed. But you're not bitter

Re: endianness guide

2005-02-10 Thread Albert Cahalan
On Thu, 2005-02-10 at 16:40 -0500, Michel Dänzer wrote: > On Thu, 2005-02-10 at 16:02 -0500, Albert Cahalan wrote: > > > > "char" is unsigned by default on PowerPC, but signed on every other > > system. [...] > > The second half is wrong, It's close enough. > so the rest of this perpetual rant

Re: endianness guide

2005-02-10 Thread Guglielmo Dapavo
Michel DÃnzer wrote: On Thu, 2005-02-10 at 16:02 -0500, Albert Cahalan wrote: "char" is unsigned by default on PowerPC, but signed on every other system. [...] The second half is wrong, so the rest of this perpetual rant of yours can safely be ignored. I'm afraid you'll have to deal with it

Re: endianness guide

2005-02-10 Thread Michel Dänzer
On Thu, 2005-02-10 at 16:02 -0500, Albert Cahalan wrote: > > "char" is unsigned by default on PowerPC, but signed on every other > system. [...] The second half is wrong, so the rest of this perpetual rant of yours can safely be ignored. I'm afraid you'll have to deal with it, either by 'fixing'

Re: endianness guide

2005-02-10 Thread Albert Cahalan
> > I don't know if by module you mean kernel module, but you should look > > at the ntoh[l|s] && hton[l|s] macros. That should help... (the "host" > > is supposed to be big endian, so if you work on a big endian machine, > > ntohX does nothing). > > > So if I'm using a big endian machine like

Re: endianness guide

2005-02-10 Thread Guglielmo Dapavo
Rolando Abarca wrote: On Thu, 10 Feb 2005, Guglielmo Dapavo wrote: Is there any gide howto / utility that can help me to convert a module from little-endian to big-endian? Thanks -- Guglielmo I don't know if by module you mean kernel module, but you should look at the ntoh[l|s] && hton[l|s] ma

Re: endianness guide

2005-02-10 Thread Guglielmo Dapavo
Eugen Dedu wrote: It's simple, you do not need a document. All that you need to do is to use hton[l|s] macros in ALL data (more precisely, headers, which are processed by machines of both endianess) you pass to Internet. I have a kernel module for a wireless device which freezes my kernel when

Re: endianness guide

2005-02-10 Thread Eugen Dedu
It's simple, you do not need a document. All that you need to do is to use hton[l|s] macros in ALL data (more precisely, headers, which are processed by machines of both endianess) you pass to Internet. For hton[l|s], maybe this document helps: http://www.ecst.csuchico.edu/~beej/guide/net/bgne

Re: endianness guide

2005-02-10 Thread Rolando Abarca
On Thu, 10 Feb 2005, Guglielmo Dapavo wrote: Is there any gide howto / utility that can help me to convert a module from little-endian to big-endian? Thanks -- Guglielmo I don't know if by module you mean kernel module, but you should look at the ntoh[l|s] && hton[l|s] macros. That should help.

endianness guide

2005-02-10 Thread Guglielmo Dapavo
Is there any gide howto / utility that can help me to convert a module from little-endian to big-endian? Thanks -- Guglielmo -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]