For PERL_CORE, don't undefine HAS_QUAD when building with 32 bit IVs.
authorNicholas Clark <nick@ccl4.org>
Tue, 17 Sep 2013 12:10:28 +0000 (14:10 +0200)
committerNicholas Clark <nick@ccl4.org>
Wed, 18 Sep 2013 07:58:49 +0000 (09:58 +0200)
When commit de1c2614758a00c0 added support for $Config{d_quad} and HAS_QUAD
in Oct 1999, it also undefined HAS_QUAD. It's been that way ever since.

This isn't actually correct on a platform with a 64 bit type available, but
changing it now will cause too much breakage on CPAN for too little gain
(See RT #119753). However, we do need HAS_QUAD in the core for use by the
drand48 code, so make the undef conditional on PERL_CORE not being set.

perl.h

diff --git a/perl.h b/perl.h
index e8b35cd..ca80f53 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1605,7 +1605,12 @@ typedef UVTYPE UV;
 #  else
 #    undef IV_IS_QUAD
 #    undef UV_IS_QUAD
+#ifndef PERL_CORE
+/* We think that removing this decade-old undef this will cause too much
+   breakage on CPAN for too little gain. (See RT #119753)
+   However, we do need HAS_QUAD in the core for use by the drand48 code.  */
 #    undef HAS_QUAD
+#endif
 #  endif
 #endif