diff options
author | oracle@pcr8.pcr.com <oracle@pcr8.pcr.com> | 1999-07-19 14:39:13 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-21 11:40:39 +0000 |
commit | ebc2957beca7a62981a1e8549e5184ad57530d65 (patch) | |
tree | b41b527557c817d09a1e04db5c7eda1f3277cc93 /utils | |
parent | f7957c4fdcc945cdf979bb35a671af4bdb75f4ac (diff) | |
download | perl-ebc2957beca7a62981a1e8549e5184ad57530d65.tar.gz |
Use Errno more extensively so that error
messages are more portable (another way
would be to muck around with LC_MESSAGES).
Problem reported in
To: perl5-porters@perl.org
Subject: [ID 19990719.003] LC_MESSAGES breaks h2xs autoloaded constants on AIX 4.1.4
Message-Id: <9907192239.AA44990@pcr8.pcr.com>
p4raw-id: //depot/cfgperl@3716
Diffstat (limited to 'utils')
-rw-r--r-- | utils/h2xs.PL | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL index 3650512a57..710242aedb 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -117,7 +117,7 @@ Specifies a name to be used for the extension, e.g., S<-n RPC::DCE> Specify a prefix which should be removed from the Perl function names, e.g., S<-p sec_rgy_> This sets up the XS B<PREFIX> keyword and removes the prefix from functions that are -autoloaded via the C<constant()> mechansim. +autoloaded via the C<constant()> mechanism. =item B<-s> I<sub1,sub2> @@ -419,6 +419,7 @@ else{ # will want Carp. print PM <<'END'; use Carp; +use Errno; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); END } @@ -471,7 +472,7 @@ sub AUTOLOAD { croak "&$module::constant not defined" if \$constname eq 'constant'; my \$val = constant(\$constname, \@_ ? \$_[0] : 0); if (\$! != 0) { - if (\$! =~ /Invalid/) { + if (\$!{EINVAL} || \$! =~ /Invalid/) { \$AutoLoader::AUTOLOAD = \$AUTOLOAD; goto &AutoLoader::AUTOLOAD; } |