New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH] Errno.pm is missing a ton of values on Windows when built with MinGW-w64-4.8.0 #13789
Comments
From @steve-m-hayWhen building blead with MinGW-w64-4.8.0 I see hundreds of lines like this come out from the Errno build: Bareword found where operator expected at (eval 22) line 1, near "13834l" This doesn't happen with MinGW-w64-4.7.4 or earlier, or MinGW, or VC++. The change in behaviour is due to changes in the MinGW-w64 headers. E.g. 4.7.4 has: #define ERROR_IPSEC_IKE_PROCESS_ERR_ID 13834L but now 4.8.0 has: #define ERROR_IPSEC_IKE_PROCESS_ERR_ID __MSABI_LONG(13834) The lowercase "l" rather than uppercase "L" trips up Errno_pm.PL. The attached patch fixes this, and I think it should be a 5.20 blocker -- as the attached Errnos.tar.gz shows, the difference between the 4.7.4-generated Errno.pm and the original (i.e. current) 4.8.0-generated Errno.pm is HUGE. The fixed 4.8.0-generated Errno.pm is much more like it. |
From @steve-m-hayErrno.patchdiff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index db8ada7..55ad01a 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
use Config;
use strict;
-our $VERSION = "1.20_02";
+our $VERSION = "1.20_03";
my %err = ();
@@ -250,7 +250,7 @@ sub write_errno_pm {
next unless ($name, $expr) = /"(.*?)"\s*\[\s*\[\s*(.*?)\s*\]\s*\]/;
next if $name eq $expr;
$expr =~ s/\(?\(\s*[a-z_]\w*\s*\)([^\)]*)\)?/$1/i; # ((type)0xcafebabe) at alia
- $expr =~ s/((?:0x)?[0-9a-fA-F]+)[LU]+\b/$1/g; # 2147483647L et alia
+ $expr =~ s/((?:0x)?[0-9a-fA-F]+)[luLU]+\b/$1/g; # 2147483647L et alia
next if $expr =~ m/^[a-zA-Z]+$/; # skip some Win32 functions
if($expr =~ m/^0[xX]/) {
$err{$name} = hex $expr;
|
From @steve-m-hayApplied in commit f974e9b. |
@steve-m-hay - Status changed from 'new' to 'resolved' |
Migrated from rt.perl.org#121773 (status was 'resolved')
Searchable as RT121773$
The text was updated successfully, but these errors were encountered: