summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-05-06 19:58:10 +0200
committerNicholas Clark <nick@ccl4.org>2013-05-20 21:19:43 +0200
commit0c0fa9f456cec3d6fd9e033a5024063564ee1ca7 (patch)
treed67d37a7734bf1f4fc0d31ed904cb5bd05341d0b /pp_pack.c
parenta1219b5e0bb6c311848c834f67e70ff7a19c6bf4 (diff)
downloadperl-0c0fa9f456cec3d6fd9e033a5024063564ee1ca7.tar.gz
Merge the identical definitions of DO_BO_UNPACK and DO_BO_PACK.
Delete the now-unused mixed-endian definitions of DO_BO_UNPACK and DO_BO_PACK, and the macro BO_CANT_DOIT, as they were the last two things using it.
Diffstat (limited to 'pp_pack.c')
-rw-r--r--pp_pack.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/pp_pack.c b/pp_pack.c
index 281942145c..5ceed1b3c5 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -246,24 +246,6 @@ S_mul128(pTHX_ SV *sv, U8 m)
# define ENDIANNESS_ALLOWED_TYPES "sSiIlLqQjJfFdDpP("
-#if BYTEORDER == 0x4321 || BYTEORDER == 0x87654321 /* big-endian */
-
-# define DO_BO_UNPACK(var, type) \
- STMT_START { \
- if (needs_swap) { \
- my_swabn(&var, sizeof(var)); \
- } \
- } STMT_END
-
-# define DO_BO_PACK(var, type) \
- STMT_START { \
- if (needs_swap) { \
- my_swabn(&var, sizeof(var)); \
- } \
- } STMT_END
-
-# elif BYTEORDER == 0x1234 || BYTEORDER == 0x12345678 /* little-endian */
-
# define DO_BO_UNPACK(var, type) \
STMT_START { \
if (needs_swap) { \
@@ -278,27 +260,6 @@ S_mul128(pTHX_ SV *sv, U8 m)
} \
} STMT_END
-#else
-# define DO_BO_UNPACK(var, type) BO_CANT_DOIT(unpack, type)
-# define DO_BO_PACK(var, type) BO_CANT_DOIT(pack, type)
-#endif
-
-# define BO_CANT_DOIT(action, type) \
- STMT_START { \
- switch (TYPE_ENDIANNESS(datumtype)) { \
- case TYPE_IS_BIG_ENDIAN: \
- Perl_croak(aTHX_ "Can't %s big-endian %ss on this " \
- "platform", #action, #type); \
- break; \
- case TYPE_IS_LITTLE_ENDIAN: \
- Perl_croak(aTHX_ "Can't %s little-endian %ss on this " \
- "platform", #action, #type); \
- break; \
- default: \
- break; \
- } \
- } STMT_END
-
#define PACK_SIZE_CANNOT_CSUM 0x80
#define PACK_SIZE_UNPREDICTABLE 0x40 /* Not a fixed size element */
#define PACK_SIZE_MASK 0x3F