ok, what's the official take on "endianness"?
Robert P. J. Day
rpjday at mindspring.com
Thu Jun 1 18:53:39 UTC 2006
On Thu, 1 Jun 2006, David Daney wrote:
> Robert P. J. Day wrote:
> > probably a silly question, but what's the whole story on best
> > practises for dealing with endianness?
> >
>
> Is this a trick question?
>
> In general don't write code that has endianness dependencies.
>
> For network code use htonl(), htons(), ntohl() and ntohs().
>
> If you are working with file systems or other things where the
> endianness of on-disk data structures is important, #include
> <endian.h> and be very careful.
but this doesn't address what's happening in busybox at the moment,
which is slightly more complicated.
rday
More information about the busybox
mailing list