summaryrefslogtreecommitdiff
path: root/ext/Errno
diff options
context:
space:
mode:
authorCurtis Jewell <perl@csjewell.fastmail.us>2010-08-24 14:07:51 -0600
committerFlorian Ragwitz <rafl@debian.org>2010-09-02 03:05:07 +0200
commitbe54382c6ee2d28448a2bfa85dedcbb6144583ae (patch)
treed5a9928bb839d6f0a09e56b4103cd04f6526d70c /ext/Errno
parent11ce4a763a0bb03971d6097fecf93928e61db557 (diff)
downloadperl-be54382c6ee2d28448a2bfa85dedcbb6144583ae.tar.gz
Sanity check on Errno values.
On a few machines (Win32/gcc using mingw64 headers) Errno.pm will find a value that is not numeric for a proposed error key. This change adds a sanity check to discard such keys.
Diffstat (limited to 'ext/Errno')
-rw-r--r--ext/Errno/Errno_pm.PL5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 0899ddea91..d33cd26c39 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -357,8 +357,9 @@ my %err;
BEGIN {
%err = (
EDQ
-
- my @err = sort { $err{$a} <=> $err{$b} } keys %err;
+
+ my @err = sort { $err{$a} <=> $err{$b} }
+ grep { $err{$_} =~ /-?\d+$/ } keys %err;
foreach $err (@err) {
print "\t$err => $err{$err},\n";