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.
0,
/* N */ SIZE32,
0, 0,
-#if defined(HAS_QUAD)
+#if IVSIZE >= 8
/* Q */ sizeof(Uquad_t),
#else
0,
/* n */ SIZE16,
0,
/* p */ sizeof(char *) | PACK_SIZE_CANNOT_CSUM,
-#if defined(HAS_QUAD)
+#if IVSIZE >= 8
/* q */ sizeof(Quad_t),
#else
0,
/* n */ SIZE16,
0,
/* p */ sizeof(char *) | PACK_SIZE_CANNOT_CSUM,
-#if defined(HAS_QUAD)
+#if IVSIZE >= 8
/* q */ sizeof(Quad_t),
#else
0,
0,
/* N */ SIZE32,
0, 0,
-#if defined(HAS_QUAD)
+#if IVSIZE >= 8
/* Q */ sizeof(Uquad_t),
#else
0,
PUSHs(newSVpvn_flags(aptr, len, SVs_TEMP));
}
break;
-#ifdef HAS_QUAD
+#if IVSIZE >= 8
case 'q':
while (len-- > 0) {
Quad_t aquad;
cuv += auquad;
}
break;
-#endif /* HAS_QUAD */
+#endif
/* float and double added gnb@melba.bby.oz.au 22/11/89 */
case 'f':
while (len-- > 0) {
PUSH32(utf8, cur, &ai32, needs_swap);
}
break;
-#ifdef HAS_QUAD
+#if IVSIZE >= 8
case 'Q':
while (len-- > 0) {
Uquad_t auquad;
PUSH_VAR(utf8, cur, aquad, needs_swap);
}
break;
-#endif /* HAS_QUAD */
+#endif
case 'P':
len = 1; /* assume SV is correct length */
GROWING(utf8, cat, start, cur, sizeof(char *));
$text .= ",";
if ($condition) {
- $condition = join " && ", map {"defined($_)"} split ' ', $condition;
$text = "#if $condition
$text
#else
L =SIZE32
p * char *
w * * char
-q Quad_t HAS_QUAD
-Q Uquad_t HAS_QUAD
+q Quad_t IVSIZE >= 8
+Q Uquad_t IVSIZE >= 8
f float
d double
F =NVSIZE
-D =LONG_DOUBLESIZE HAS_LONG_DOUBLE USE_LONG_DOUBLE
+D =LONG_DOUBLESIZE defined(HAS_LONG_DOUBLE) && defined(USE_LONG_DOUBLE)