summaryrefslogtreecommitdiff
path: root/packsizetables.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-09-11 12:12:25 +0100
committerNicholas Clark <nick@ccl4.org>2013-09-17 13:57:52 +0200
commit1640b983ff7c1296873ae4dc0e2163160c853cb3 (patch)
tree1f2a305a871cfb523c7d7c83a3e5875746a1ba1d /packsizetables.c
parentb002c7b1f7eb7c6fa27e84405047d34581195270 (diff)
downloadperl-1640b983ff7c1296873ae4dc0e2163160c853cb3.tar.gz
Use IVSIZE not HAS_QUAD to enable 'q' and 'Q' formats in pack.
Whilst the code for 'q' and 'Q' in pp_pack is itself well behaved if enabled on a perl with 32 bit IVs (using SvNV instead of SvIV and SvUV), the regression tests are not. Several tests use an eval of "pack 'q'" to determine if 64 bit integer support is available (instead of $Config{ivsize}), and t/op/pack.t fails many tests. While these could be fixed (or skipped), unfortunately the approach of evaling "pack 'q'" is fairly popular on CPAN, so the breakage isn't just in the perl core, and might also be present in code we can't see or submit patches for.
Diffstat (limited to 'packsizetables.c')
-rw-r--r--packsizetables.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/packsizetables.c b/packsizetables.c
index 8c57d410aa..1eeae13ef4 100644
--- a/packsizetables.c
+++ b/packsizetables.c
@@ -34,7 +34,7 @@ STATIC const packprops_t packprops[512] = {
0,
/* N */ SIZE32,
0, 0,
-#if defined(HAS_QUAD)
+#if IVSIZE >= 8
/* Q */ sizeof(Uquad_t),
#else
0,
@@ -59,7 +59,7 @@ STATIC const packprops_t packprops[512] = {
/* n */ SIZE16,
0,
/* p */ sizeof(char *) | PACK_SIZE_CANNOT_CSUM,
-#if defined(HAS_QUAD)
+#if IVSIZE >= 8
/* q */ sizeof(Quad_t),
#else
0,
@@ -141,7 +141,7 @@ STATIC const packprops_t packprops[512] = {
/* n */ SIZE16,
0,
/* p */ sizeof(char *) | PACK_SIZE_CANNOT_CSUM,
-#if defined(HAS_QUAD)
+#if IVSIZE >= 8
/* q */ sizeof(Quad_t),
#else
0,
@@ -170,7 +170,7 @@ STATIC const packprops_t packprops[512] = {
0,
/* N */ SIZE32,
0, 0,
-#if defined(HAS_QUAD)
+#if IVSIZE >= 8
/* Q */ sizeof(Uquad_t),
#else
0,