Make Haiku endian independent
|Reported by:||jscipione||Owned by:||nobody|
Rob Pike recently wrote a blog article about how to write endian-independent code. Plan 9 for example has no endian-dependent code despite running on multiple platforms.
Available at the time of this writing here: http://commandcenter.blogspot.com/2012/04/byte-order-fallacy.html
The gist of his technique is this, don't be concerned with the endianness of the current host, just pick one, save to your file or write to your stream using that endian, then, on the other side, read the same endian back.
We should be able to eliminate all calls to B_HOST_TO_BENDIAN_INT32 and B_BENDIAN_TO_HOST_INT32. Since we are on x86 right now little endian makes sense to use, but, in the end it really doesn't matter which you choose.
This is a low-priority enhancement, not required, but would be nice to have.