Skip to content

Commit

Permalink
Errno: also escape osvers
Browse files Browse the repository at this point in the history
Partly fixes #21135

Tested by Configuring with

  ... -Darchname='x86_64-linux@alpha' -Dosvers='4.19.0@beta'
  • Loading branch information
tonycoz committed Jul 3, 2023
1 parent 5d7d794 commit 8f93839
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ext/Errno/Errno_pm.PL
Expand Up @@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
use Config;
use strict;

our $VERSION = "1.37";
our $VERSION = "1.38";

my %err = ();

Expand Down Expand Up @@ -271,9 +271,9 @@ sub write_errno_pm {
close(CPPO);
}

# escape $Config{'archname'}
my $archname = $Config{'archname'};
$archname =~ s/([@%\$])/\\$1/g;
# escape $Config{'archname'}, $Config{'osvers'}
my ($archname, $osvers) = @Config{'archname', 'osvers'};
$_ = quotemeta for $archname, $osvers;

# Write Errno.pm

Expand All @@ -297,8 +297,8 @@ EDQ
print <<"CONFIG_CHECK_END";
use Config;
"\$Config{'archname'}-\$Config{'osvers'}" eq
"$archname-$Config{'osvers'}" or
die "Errno architecture ($archname-$Config{'osvers'}) does not match executable architecture (\$Config{'archname'}-\$Config{'osvers'})";
"$archname-$osvers" or
die "Errno architecture ($archname-$osvers) does not match executable architecture (\$Config{'archname'}-\$Config{'osvers'})";
CONFIG_CHECK_END
}
Expand Down

0 comments on commit 8f93839

Please sign in to comment.