This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Handle PL_sh_path better in globvar.sym and makedef.pl
authorNicholas Clark <nick@ccl4.org>
Fri, 19 Aug 2011 10:12:16 +0000 (12:12 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 23 Aug 2011 09:28:55 +0000 (11:28 +0200)
PL_sh_path needs some form of special case because it is conditionally
defined either in perlvar.h or perl.h, but globvar.sym mentions all symbols
unconditionally, and undef -DPERL_GLOBAL_STRUCT perlvar.h is parsed as an
unconditional skip list.

globvar.sym
makedef.pl

index 06fe8af..1cbdc34 100644 (file)
@@ -47,6 +47,7 @@ regkind
 revision
 runops_dbg
 runops_std
+sh_path
 sig_name
 sig_num
 simple
index a4b5ced..318202f 100644 (file)
@@ -530,6 +530,9 @@ if ($define{HAS_SIGNBIT}) {
 
 if ($define{'PERL_GLOBAL_STRUCT'}) {
     readvar($perlvars_h, \%skip);
+    # This seems like the least ugly way to cope with the fact that PL_sh_path
+    # is mentioned in perlvar.h and globvar.sym, and always exported.
+    delete $skip{PL_sh_path};
     ++$export{Perl_GetVars};
     try_symbols(qw(PL_Vars PL_VarsPtr)) unless $ARGS{CCTYPE} eq 'GCC';
 } else {