In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/3edba68397e487b39cca6e7fc0b75ab4a2f6a341?hp=b6806da1b6a1684b26f8ef5b7f2ca4133d468604>

- Log -----------------------------------------------------------------
commit 3edba68397e487b39cca6e7fc0b75ab4a2f6a341
Author: Craig A. Berry <[email protected]>
Date:   Thu Nov 30 09:07:57 2017 -0600

    Try harder to define INT64_C and UINT64_C.
    
    These are steadily being used in more and more macros that are
    available to extensions as well as core, but the use of Perl's
    home-grown versions (for when we don't get them from stdint.h)
    has depended on the definition of HAS_QUAD.  However, HAS_QUAD
    is explicitly turned off in perl.h when PERL_CORE is not defined,
    and has warnings about widespread breakage if that undef were to
    be removed (referring to  RT #119753). So extensions that use
    macros that in turn use INT64_C or UINT64_C were failing to
    build.
    
    So in order to know that 64-bit integers are available without
    using the HAS_QUAD macro that was intended for just that purpose,
    use QUADKIND as a way of saying "We know we had HAS_QUAD before
    you hid it from us."  Ugh.

-----------------------------------------------------------------------

Summary of changes:
 handy.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/handy.h b/handy.h
index e049192f39..08a09ec326 100644
--- a/handy.h
+++ b/handy.h
@@ -173,7 +173,13 @@ typedef U64TYPE U64;
 /* INT64_C/UINT64_C are C99 from <stdint.h> (so they will not be
  * available in strict C89 mode), but they are nice, so let's define
  * them if necessary. */
-#if defined(HAS_QUAD)
+
+/* N.B.  We would like to say HAS_QUAD here, but that doesn't actually mean 
what
+ * it has always been documented to mean (see RT #119753) and is explicitly 
turned
+ * off in perl.h outside of core with dire warnings about removing the undef.
+ */
+
+#if defined(QUADKIND)
 #  undef PeRl_INT64_C
 #  undef PeRl_UINT64_C
 /* Prefer the native integer types (int and long) over long long

-- 
Perl5 Master Repository

Reply via email to