Size-independent byte order swapping functions.

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Feb 3 02:01:59 PST 2004


In message <20040203083444.GM4200 at garage.freebsd.pl>, Pawel Jakub Dawidek write
s:

>I'm planning to commit this patch:
>
>	http://garage.freebsd.pl/patches/endian.h.patch

I have a hard time seeing a sensible use for these.

Endianess conversion is almost exclusively used in communications
(even if the "transmission media" is a disk), and I can't possibly
see how it can make sense to be lax about wordsize but strict about
byteordering.

Could you please tell us what you need these for and why you could
not use the explicitly sized families of endian functions ?

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list