Subject: Re: Converting to little endian
To: None <tv@pobox.com>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: tech-kern
Date: 12/28/1998 15:02:28
Todd Vierling wrote:
> #include <sys/param.h>
> #include <machine/bswap.h>
> ...
> 
> 	u_int32_t x;
> 	...
> #if BYTE_ORDER == BIG_ENDIAN
> 	x = bswap32(x);
> #endif
You must run a different NetBSD than I do.  There is no bswap.h
header file on my machine.  endian.h works though, but the definition
of bswap32 in that file is not at all as efficient as ntohl().  Besides,
I would think that converting to little endian would be common enough
that it merits a special function?

     -- Lennart