This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Swap byte order in DO_BO_(UN)?PACK based on a variable needs_swap.
authorNicholas Clark <nick@ccl4.org>
Mon, 6 May 2013 17:41:10 +0000 (19:41 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 20 May 2013 19:19:43 +0000 (21:19 +0200)
commita1219b5e0bb6c311848c834f67e70ff7a19c6bf4
treeff06cb63988371b951827d37ef57f4c157e3fcfb
parente8fda8c499f46bb801215ff1dbea51c1f3007a6c
Swap byte order in DO_BO_(UN)?PACK based on a variable needs_swap.

Add the macro NEEDS_SWAP to initialise needs_swap based on
TYPE_ENDIANNESS(datumtype). This makes the two definitions of DO_BO_UNPACK
identical, and the two definitions of DO_BO_PACK identical.

This also makes building pp_pack.c on a mixed endian byteorder architecture
a compile time error. The commit adds pointers on where to add code to
re-instate support for such architectures.
pp_pack.c