Skip Menu |
Report information
Id: 131726
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: sisyphus <sisyphus1 [at] optusnet.com.au>
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: low
Type: unknown
Perl Version: (no value)
Fixed In: (no value)



Subject: [Win32] perl.h remaps 'strtoll' and 'strtoull' incorrectly
To: <perlbug [...] perl.org>
From: <sisyphus1 [...] optusnet.com.au>
Date: Mon, 10 Jul 2017 00:16:51 +1000
Download (untitled) / with headers
text/plain 1.8k
Hi, The bug has been reported to the WX queue ( https://rt.cpan.org/Ticket/Display.html?id=121683 ) and to the Perl-Dist-Strawberry queue ( https://rt.cpan.org/Ticket/Display.html?id=122353 ) The WX thread contains this patch which seems fine to me: #################################### --- /c/users/keckhard/Downloads/Perl/perl-5.26.0/perl.h 2017-05-30 09:58:05 +0000 +++ /c/perl5/perl/lib/CORE/perl.h 2017-06-16 10:02:58 +0000 @@ -6261,7 +6261,7 @@ # ifdef __hpux # define strtoll __strtoll /* secret handshake */ # endif -# ifdef WIN64 +# if defined(WIN64) && defined(_MSC_VER) # define strtoll _strtoi64 /* secret handshake */ # endif # if !defined(Strtol) && defined(HAS_STRTOLL) @@ -6295,7 +6295,7 @@ # ifdef __hpux # define strtoull __strtoull /* secret handshake */ # endif -# ifdef WIN64 +# if defined(WIN64) && defined(_MSC_VER) # define strtoull _strtoui64 /* secret handshake */ # endif # if !defined(Strtoul) && defined(HAS_STRTOULL) #################################### I've also struck the issue trying to build Audio::TagLib-1.67 on perl-5.26.0. IME it's only 64-bit builds of perl-5.26.0 that are afflicted. Furthermore, having built 64-bit perl-5.26.0 with mingw ports of gcc-5.3.0, gcc-6.3.0 and gcc-7.1.0, I'm finding that there's no such issue when gcc-5.3.0 is used. Apparently, changes made to the mingw x64 ports some time after 5.3.0 and before 6.3.0 are contributing factors. Simplest way of reproducing the failure that I could come up with was to compile this script: /***********************/ #include "EXTERN.h" #include "perl.h" #include <string> int main() { return 0; } /***********************/ with: g++ -c -IC:/path/to/perl/lib/CORE try.cpp Can this be fixed (as per the patch provided by the WX thread) for perl-5.26.1 ? Cheers, Rob
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 2.1k
On Sun, 09 Jul 2017 14:40:52 GMT, sisyphus wrote: Show quoted text
> Hi, > > The bug has been reported to the WX queue ( > https://rt.cpan.org/Ticket/Display.html?id=121683 ) and to the > Perl-Dist-Strawberry queue ( > https://rt.cpan.org/Ticket/Display.html?id=122353 ) > The WX thread contains this patch which seems fine to me: > > #################################### > --- /c/users/keckhard/Downloads/Perl/perl-5.26.0/perl.h 2017-05-30 > 09:58:05 +0000 > +++ /c/perl5/perl/lib/CORE/perl.h 2017-06-16 10:02:58 +0000 > @@ -6261,7 +6261,7 @@ > # ifdef __hpux > # define strtoll __strtoll /* secret handshake */ > # endif > -# ifdef WIN64 > +# if defined(WIN64) && defined(_MSC_VER) > # define strtoll _strtoi64 /* secret handshake */ > # endif > # if !defined(Strtol) && defined(HAS_STRTOLL) > @@ -6295,7 +6295,7 @@ > # ifdef __hpux > # define strtoull __strtoull /* secret handshake */ > # endif > -# ifdef WIN64 > +# if defined(WIN64) && defined(_MSC_VER) > # define strtoull _strtoui64 /* secret handshake */ > # endif > # if !defined(Strtoul) && defined(HAS_STRTOULL) > #################################### > > I've also struck the issue trying to build Audio::TagLib-1.67 on > perl-5.26.0. > > IME it's only 64-bit builds of perl-5.26.0 that are afflicted. > Furthermore, having built 64-bit perl-5.26.0 with mingw ports of gcc-5.3.0, > gcc-6.3.0 and gcc-7.1.0, I'm finding that there's no such issue when > gcc-5.3.0 is used. > Apparently, changes made to the mingw x64 ports some time after 5.3.0 and > before 6.3.0 are contributing factors. > > Simplest way of reproducing the failure that I could come up with was to > compile this script: > > /***********************/ > #include "EXTERN.h" > #include "perl.h" > > #include <string> > > int main() { > return 0; > } > > /***********************/ > with: > g++ -c -IC:/path/to/perl/lib/CORE try.cpp > > Can this be fixed (as per the patch provided by the WX thread) for > perl-5.26.1 ? >
Is this a regression from earlier versions of Perl? If not, then AFAIK it would not qualify for perl-5.26.1. Thank you very much. -- James E Keenan (jkeenan@cpan.org)
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 245b
On Sun, 09 Jul 2017 08:13:20 -0700, jkeenan wrote: Show quoted text
> Is this a regression from earlier versions of Perl? If not, then > AFAIK it would not qualify for perl-5.26.1.
perlpolicy.pod explicitly allows portability fixes. -- Father Chrysostomos
To: <perlbug-followup [...] perl.org>
Subject: Re: [perl #131726] [Win32] perl.h remaps 'strtoll' and 'strtoull' incorrectly
Date: Mon, 10 Jul 2017 10:19:30 +1000
From: <sisyphus1 [...] optusnet.com.au>
CC: <perl5-porters [...] perl.org>
Show quoted text
-----Original Message----- From: James E Keenan via RT Sent: Monday, July 10, 2017 1:13 AM To: OtherRecipients of perl Ticket #131726: Cc: perl5-porters@perl.org Subject: [perl #131726] [Win32] perl.h remaps 'strtoll' and 'strtoull' incorrectly
> On Sun, 09 Jul 2017 14:40:52 GMT, sisyphus wrote:
>> Hi, >> >> The bug has been reported to the WX queue ( >> https://rt.cpan.org/Ticket/Display.html?id=121683 ) and to the >> Perl-Dist-Strawberry queue ( >> https://rt.cpan.org/Ticket/Display.html?id=122353 )
[snip]
> Is this a regression from earlier versions of Perl? If not, then AFAIK it > would not qualify for perl-5.26.1.
The offending perl.h code goes back as far as 5.18.0 (perhaps further), and the assertion in my initial post that only 64-bit builds of perl-5.26.0 are affected may well be incorrect. It's probable (untested) that earlier versions of perl are similarly afflicted if built with a "sufficiently recent" 64-bit mingw compiler (eg gcc-6.3.0, gcc-7.1.0). It would therefore be best if the patch could also be applied to any future releases of earlier perl branches. Cheers, Rob
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 442b
Thanks for the report and the pointer to the fix. This is now in blead as commit 8ed77d12c9275cd4e145ab50aaecf69730166a9b. I've added my vote for it to the 5.24 and 5.26 voting files, under the guise of "Portability fixes" as suggested above, even though it doesn't quite fit the perlpolicy description of, "changes to Configure and the files in the hints/ folder." (They're only meant as examples, not as a complete list of what's allowed.)
To: perl5-porters [...] perl.org
Date: Fri, 28 Jul 2017 10:00:25 +0200
Subject: Re: [perl #131726] [Win32] perl.h remaps 'strtoll' and 'strtoull' incorrectly
From: Sawyer X <xsawyerx [...] gmail.com>
Download (untitled) / with headers
text/plain 522b
On 07/27/2017 07:23 PM, Steve Hay via RT wrote: Show quoted text
> Thanks for the report and the pointer to the fix. This is now in blead as commit 8ed77d12c9275cd4e145ab50aaecf69730166a9b. > > I've added my vote for it to the 5.24 and 5.26 voting files, under the guise of "Portability fixes" as suggested above, even though it doesn't quite fit the perlpolicy description of, "changes to Configure and the files in the hints/ folder." (They're only meant as examples, not as a complete list of what's allowed.)
Added my votes to it.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org