>> big endian without a formal proof - anyone to confim this?
> I don't know, it's not in the man page, and no one I ask knows. If you
> want to write portable code, use network order. It will be easier to
Here is documentation on the network byte-order conversion functions in the
GNU C Library.
_BIG_ENDIAN and _LITTLE_ENDIAN are macros provided by many compilers. They
shouldn't be necessary if the htonl, htons, ntohl, and ntohs functions are
usable across platforms.
As a note: The network byte order is big endian. Intel 16/32-bit 80x86 CPUs
are little endian; SUN SPARCs and Compaq Alpha are big endian; Motorola/IBM
PowerPC, Intel ArmStrong (8096x), Intel IA-64 (64-bit Pentium or whatever),
and other newer CPUs are swappable between big or little endian in hardware
depending on the operating system's requirements. (Furthermore, 64-bit
Linux runs as little endian on IA-64 while it runs as big endian on Alpha
World Wide Web - http://www.webaugur.com/dave
Page via mail - email@example.com
ICQ Universal Internet Number - 412039
E-Mail - firstname.lastname@example.org
Received on Thu Sep 2 19:34:10 1999