summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/DB_File/DB_File.pm3
-rw-r--r--ext/Fcntl/Fcntl.pm3
-rw-r--r--ext/GDBM_File/GDBM_File.pm3
3 files changed, 6 insertions, 3 deletions
diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm
index 7dd1d26360..90a82b8fca 100644
--- a/ext/DB_File/DB_File.pm
+++ b/ext/DB_File/DB_File.pm
@@ -15,6 +15,7 @@ require 5.003 ;
use strict;
use Carp;
+use Errno;
require Tie::Hash;
@DB_File::HASHINFO::ISA = qw(Tie::Hash);
@@ -196,7 +197,7 @@ sub AUTOLOAD {
($constname = $AUTOLOAD) =~ s/.*:://;
my $val = constant($constname, @_ ? $_[0] : 0);
if ($! != 0) {
- if ($! =~ /Invalid/) {
+ if ($!{EINVAL} || $! =~ /Invalid/) {
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD;
}
diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm
index 00f834d223..664c2cb28d 100644
--- a/ext/Fcntl/Fcntl.pm
+++ b/ext/Fcntl/Fcntl.pm
@@ -44,6 +44,7 @@ what constants are implemented in your system.
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
+use Errno;
require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
@@ -122,7 +123,7 @@ sub AUTOLOAD {
(my $constname = $AUTOLOAD) =~ s/.*:://;
my $val = constant($constname, 0);
if ($! != 0) {
- if ($! =~ /Invalid/) {
+ if ($!{EINVAL} || $! =~ /Invalid/) {
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD;
}
diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm
index aff01527dc..1d90a341f5 100644
--- a/ext/GDBM_File/GDBM_File.pm
+++ b/ext/GDBM_File/GDBM_File.pm
@@ -43,6 +43,7 @@ use strict;
use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);
require Carp;
+use Errno;
require Tie::Hash;
require Exporter;
use AutoLoader;
@@ -66,7 +67,7 @@ sub AUTOLOAD {
($constname = $AUTOLOAD) =~ s/.*:://;
my $val = constant($constname, @_ ? $_[0] : 0);
if ($! != 0) {
- if ($! =~ /Invalid/) {
+ if ($!{EINVAL} || $! =~ /Invalid/) {
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD;
}