Skip to content
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

LC_MESSAGES breaks h2xs autoloaded constants on AIX 4.1.4 #209

Closed
p5pRT opened this issue Jul 19, 1999 · 3 comments
Closed

LC_MESSAGES breaks h2xs autoloaded constants on AIX 4.1.4 #209

p5pRT opened this issue Jul 19, 1999 · 3 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Jul 19, 1999

Migrated from rt.perl.org#1015 (status was 'resolved')

Searchable as RT1015$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jul 19, 1999

From oracle@pcr8.pcr.com

On AIX 4.1.4, setting LC_MESSAGES to "en_US" changes the messages
returned by strerror(). Specifically, strerror(EINVAL) results in
"A system call received a parameter that is not valid." rather than
"Invalid argument". Modules created by h2xs, including Fcntl, depend
on $!=EINVAL matching /Invalid/ to autoload constants. perllocale.pod
implies that LC_MESSAGES has no effect on the standard Perl distribution.

Of course, it may just be that AIX is flaky.

Perl Info


Site configuration information for perl 5.00503:

Configured by oracle at Wed Jun 23 14:24:59 EDT 1999.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=aix, osvers=4.1.4.0, archname=aix
    uname='aix pcr8 1 4 000031129000 '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=
    cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192 -I/usr/local/include'
    ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192 -I/usr/local/include'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-ldbm -lld -lm -lc -lbsd -lPW
    libc=, so=a, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-bE:perl.exp'
    cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lc -L/usr/local/lib'

Locally applied patches:
    


@INC for perl 5.00503:
    /home/oracle/perl/
    /usr/local/lib/perl5/5.005/aix
    /usr/local/lib/perl5/5.005
    /usr/local/lib/perl5/site_perl/5.005/aix
    /usr/local/lib/perl5/site_perl/5.005
    .


Environment for perl 5.00503:
    HOME=/home/oracle
    LANG=C
    LANGUAGE (unset)
    LC_MESSAGES=en_US
    LC__FASTMSG=true
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/bin:
    PERLLIB=/home/oracle/perl/
    PERL_BADLANG (unset)
    SHELL=/usr/bin/ksh

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jul 27, 2000

From [Unknown Contact. See original ticket]

This is the original report​:

On AIX 4.1.4, setting LC_MESSAGES to "en_US" changes the messages
returned by strerror(). Specifically, strerror(EINVAL) results in
"A system call received a parameter that is not valid." rather than
"Invalid argument". Modules created by h2xs, including Fcntl, depend
on $!=EINVAL matching /Invalid/ to autoload constants. perllocale.pod
implies that LC_MESSAGES has no effect on the standard Perl distribution.

Of course, it may just be that AIX is flaky.

I recommend the following change to bleadperl to fix​:

Inline Patch
--- h2xs.orig   Thu Jul 27 11:45:41 2000
+++ h2xs.PL     Thu Jul 27 11:43:29 2000
@@ -815,7 +815,7 @@
     croak "&$module::constant not defined" if \$constname eq 'constant';
     my \$val = constant(\$constname, \@_ ? \$_[0] : 0);
     if (\$! != 0) {
-       if (\$! =~ /Invalid/ || \$!{EINVAL}) {
+       if (\$! =~ /(In|not )valid/ || \$!{EINVAL}) {
            \$AutoLoader::AUTOLOAD = \$AUTOLOAD;
            goto &AutoLoader::AUTOLOAD;
        }

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Nov 2, 2000

From The RT System itself

Nowadays also the numeric error code is checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant