In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/85b769704171cb40faee0cdff60865fbf100c4c0?hp=b795c6e90c03b712a3fecc424179ab600d71be8a>
- Log ----------------------------------------------------------------- commit 85b769704171cb40faee0cdff60865fbf100c4c0 Author: Steve Hay <[email protected]> Date: Tue Aug 7 08:53:42 2012 +0100 Use _strtoi64, _strtoui64 and _atoi64 for WIN64 VC++ builds VC++ has QUADKIND == QUAD_IS___INT64 so the "secret handshakes" were only getting used for WIN64 GCC builds (where QUADKIND == QUAD_IS_LONG_LONG). M perl.h commit 5286555350c911f136a6b28b3bbca509249d1f94 Author: Steve Hay <[email protected]> Date: Tue Aug 7 08:49:09 2012 +0100 VC++ has QUADKIND == QUAD_IS___INT64 so we might as well make use of it - Use I64/UI64 suffixes rather than I64TYPE/U64TYPE casts for INT64_C/UINT64_C, not just when _WIN64 is defined - Use UI64 suffix rather than UL for U64_CONST M handy.h M perl.h ----------------------------------------------------------------------- Summary of changes: handy.h | 12 ++++++------ perl.h | 11 ++++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/handy.h b/handy.h index db018d7..d4df8bd 100644 --- a/handy.h +++ b/handy.h @@ -191,13 +191,13 @@ typedef U64TYPE U64; # define PeRl_INT64_C(c) CAT2(c,LL) # define PeRl_UINT64_C(c) CAT2(c,ULL) # else -# if LONGSIZE == 8 && QUADKIND == QUAD_IS_LONG -# define PeRl_INT64_C(c) CAT2(c,L) -# define PeRl_UINT64_C(c) CAT2(c,UL) +# if QUADKIND == QUAD_IS___INT64 +# define PeRl_INT64_C(c) CAT2(c,I64) +# define PeRl_UINT64_C(c) CAT2(c,UI64) # else -# if defined(_WIN64) && defined(_MSC_VER) -# define PeRl_INT64_C(c) CAT2(c,I64) -# define PeRl_UINT64_C(c) CAT2(c,UI64) +# if LONGSIZE == 8 && QUADKIND == QUAD_IS_LONG +# define PeRl_INT64_C(c) CAT2(c,L) +# define PeRl_UINT64_C(c) CAT2(c,UL) # else # define PeRl_INT64_C(c) ((I64TYPE)(c)) # define PeRl_UINT64_C(c) ((U64TYPE)(c)) diff --git a/perl.h b/perl.h index af4e9bf..ab6807b 100644 --- a/perl.h +++ b/perl.h @@ -729,6 +729,8 @@ EXTERN_C int usleep(unsigned int); # define U64_CONST(x) ((U64)x##UL) # elif QUADKIND == QUAD_IS_LONG_LONG # define U64_CONST(x) ((U64)x##ULL) +# elif QUADKIND == QUAD_IS___INT64 +# define U64_CONST(x) ((U64)x##UI64) # else /* best guess we can make */ # define U64_CONST(x) ((U64)x##UL) # endif @@ -5324,7 +5326,8 @@ typedef struct am_table_short AMTS; #endif /* !USE_LOCALE_NUMERIC */ -#if !defined(Strtol) && defined(USE_64_BIT_INT) && defined(IV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG +#if !defined(Strtol) && defined(USE_64_BIT_INT) && defined(IV_IS_QUAD) && \ + (QUADKIND == QUAD_IS_LONG_LONG || QUADKIND == QUAD_IS___INT64) # ifdef __hpux # define strtoll __strtoll /* secret handshake */ # endif @@ -5346,7 +5349,8 @@ typedef struct am_table_short AMTS; /* It would be more fashionable to use Strtol() to define atol() * (as is done for Atoul(), see below) but for backward compatibility * we just assume atol(). */ -# if defined(USE_64_BIT_INT) && defined(IV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG && defined(HAS_ATOLL) +# if defined(USE_64_BIT_INT) && defined(IV_IS_QUAD) && defined(HAS_ATOLL) && \ + (QUADKIND == QUAD_IS_LONG_LONG || QUADKIND == QUAD_IS___INT64) # ifdef WIN64 # define atoll _atoi64 /* secret handshake */ # endif @@ -5356,7 +5360,8 @@ typedef struct am_table_short AMTS; # endif #endif -#if !defined(Strtoul) && defined(USE_64_BIT_INT) && defined(UV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG +#if !defined(Strtoul) && defined(USE_64_BIT_INT) && defined(UV_IS_QUAD) && \ + (QUADKIND == QUAD_IS_LONG_LONG || QUADKIND == QUAD_IS___INT64) # ifdef __hpux # define strtoull __strtoull /* secret handshake */ # endif -- Perl5 Master Repository
