[Gllug] endian.h

Tethys tet at accucard.com
Wed Feb 5 15:26:30 UTC 2003


"Andy Farnsworth" writes:

>Hey,
>  I bounced this question off a Guru friend of mine on the NLUG
>http:www.nlug.org mailing list and got this response:
>
> [...]
>
>Big Endian (aka network byte order)
>Little Endian  (busted x86 byte order)
>
>So betoh32 <-> ntohl && letoh32 <-> htonl

Which will, of course, fail on Linux/SPARC, Linux/PPC and other big
endian ports, where ntohl() and htonl() are NOPs. To paraphrase,
"all the world's not an x86".

Tet

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list