Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Portability of Misaligned Data Access . . . . . . .
- Date: Sat, 29 Jul 2006 21:24:40 +0900
- From: "Josh Glover" <jmglov@example.com>
- Subject: Re: [tlug] Portability of Misaligned Data Access . . . . . . .
- References: <20060726125907.GH5111@example.com> <87ejw8corz.fsf@example.com> <20060726164125.4959ce4e.jep200404@example.com> <Pine.BSF.4.58.0607261946521.68592@example.com> <87r707bv1o.fsf@example.com> <Pine.BSF.4.58.0607270219370.17463@example.com> <87ac6vbd3l.fsf@example.com> <30ce84360607280348g14ca61degac95f2fbb5ebdc85@example.com>
On 28/07/06, Ian Wells <ijw@example.com> wrote:On point (2), let it be noted that you *never*, *ever* have to discover the endianness of your host: uint16_t read_le_u16(char *x) { return (uint16_t)x[0]+(((uint16_t)x[1]) <<8); }How about just always using htons(3) and htonl(3) to get compatible byte orders? -Josh
- Follow-Ups:
- References:
- [tlug] issues with format of double (or IEEE754)
- From: Michal Hajek
- Re: [tlug] issues with format of double (or IEEE754)
- From: Stephen J. Turnbull
- [tlug] Portability of Misaligned Data Access . . . . . . . (was Re: issues with format of double (or IEEE754))
- From: Jim
- Re: [tlug] Portability of Misaligned Data Access . . . . . . . (was Re: issues with format of double (or IEEE754))
- From: Joe Larabell
- Re: [tlug] Portability of Misaligned Data Access . . . . . . .
- From: Stephen J. Turnbull
- Re: [tlug] Portability of Misaligned Data Access . . . . . . .
- From: Joe Larabell
- Re: [tlug] Portability of Misaligned Data Access . . . . . . .
- From: Stephen J. Turnbull
- Re: [tlug] Portability of Misaligned Data Access . . . . . . .
- From: Ian Wells
Home | Main Index | Thread Index
- Prev by Date: [tlug] Floating Point Formats. . . . . . . . . . (was Re: Portability of Misaligned Data Access)
- Next by Date: Re: [tlug] Xen and VT
- Previous by thread: [tlug] Floating Point Formats. . . . . . . . . . (was Re: Portability of Misaligned Data Access)
- Next by thread: [tlug] Portable Endianness . . . . . . . . (was Re: Portability of Misaligned Data Access)
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links