[Vm-dev] The byte order fallacy

K K Subbu kksubbu.ml at gmail.com
Tue Jun 13 18:28:30 UTC 2017

On Tuesday 13 June 2017 01:08 PM, Nicolas Cellier wrote:
> last year I added SQ_SWAP_4_BYTES and SQ_SWAP_8_BYTES macros in
> platforms/Cross/vm/sqMemoryAccess.h
> These macros use the compiler intrinsics if possible.
> https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/c0da5abcc7a538efd3ab6dcc4bb2d2ef3ac5c65a
> So we should not define any new one and rather replace the suboptimal
> ones with the ones above.

Why not use htonl family of functions? They are part of POSIX standards 
and widely available in <netinet/in.h>.

See the man pages for htonl and endian.

Regards .. Subbu

More information about the Vm-dev mailing list