This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Provide ntohl, ntohs, htonl and htons no-op macros on big endian systems.
authorNicholas Clark <nick@ccl4.org>
Sat, 4 May 2013 20:03:59 +0000 (22:03 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 20 May 2013 19:19:42 +0000 (21:19 +0200)
commit8e2d7c446d5ab31e6c8e661a3c17f0f0b199d525
treeb2040d4be9d29967368829dda6867005ba78ff5b
parent260c6fee6deba90b42b0734fbdea2fea1d69c9bc
Provide ntohl, ntohs, htonl and htons no-op macros on big endian systems.

This means that there are always macros or functions for ntohl, ntohs,
htonl and htons available, so eliminate use of HAS_NTOHL etc, and
unconditionally compile the code that it was protecting. However, as code
on CPAN is using these guard macros, define all of them in perl.h

(Technically the 4 are not quite no-ops, as they truncate their values to
32 or 16 bits, to be consistent with the implementations for platforms which
need re-ordering.)
perl.h
pp_pack.c
pp_sys.c