Skip to content

Errno: also escape osvers #21146

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

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ext/Errno/Errno_pm.PL
Original file line number Diff line number Diff line change
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