Skip to main content.
home | support | download

Back to List Archive

RE: Re: Document properties

From: David Norris <kg9ae(at)>
Date: Fri Sep 03 1999 - 02:26:47 GMT
>> 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
and SPARC.)

,David Norris

World Wide Web -
Page via mail -
ICQ Universal Internet Number - 412039
E-Mail -
Received on Thu Sep 2 19:34:10 1999