diff options
author | Craig A. Berry <craigberry@mac.com> | 2007-03-08 03:06:53 +0000 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2007-03-08 03:06:53 +0000 |
commit | 7722725454288d55c568bd78ec40b04b2f51ebbd (patch) | |
tree | 42793805ce54cdad8c447402495764d6e096bab9 /vms | |
parent | 8a0be661c1b696355540b6c96400dfa590061592 (diff) | |
download | perl-7722725454288d55c568bd78ec40b04b2f51ebbd.tar.gz |
Make vms/gen_shrfls.pl better able to detect header transitions with
various compiler versions (needed after #30463).
p4raw-id: //depot/perl@30510
Diffstat (limited to 'vms')
-rw-r--r-- | vms/gen_shrfls.pl | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl index 5600644cd2..7ba40fd5af 100644 --- a/vms/gen_shrfls.pl +++ b/vms/gen_shrfls.pl @@ -174,20 +174,29 @@ if ($use_mymalloc) { $fcns{'Perl_mfree'}++; } -$preprocess_list = "${dir}perl.h + ${dir}perlapi.h + ${dir}regcomp.h"; -if ($use_perlio) { - $preprocess_list .= " + ${dir}perliol.h"; -} - $used_expectation_enum = $used_opcode_enum = 0; # avoid warnings if ($docc) { + 1 while unlink 'perlincludes.tmp'; + END { 1 while unlink 'perlincludes.tmp'; } # and clean up after + + open(PERLINC, '>perlincludes.tmp') or die "Couldn't open 'perlincludes.tmp' $!"; + + print PERLINC qq/#include "${dir}perl.h"\n/; + print PERLINC qq/#include "${dir}perlapi.h"\n/; + print PERLINC qq/#include "${dir}perliol.h"\n/ if $use_perlio; + print PERLINC qq/#include "${dir}regcomp.h"\n/; + + close PERLINC; + $preprocess_list = 'perlincludes.tmp'; + open(CPP,"${cc_cmd}/NoObj/PreProc=Sys\$Output $preprocess_list|") or die "$0: Can't preprocess $preprocess_list: $!\n"; } else { open(CPP,"$cpp_file") or die "$0: Can't read preprocessed file $cpp_file: $!\n"; } -%checkh = map { $_,1 } qw( thread bytecode byterun proto perlapi perlio perlvars intrpvar regcomp thrdvar ); +%checkh = map { $_,1 } qw( bytecode byterun intrpvar perlapi perlio perliol + perlvars proto regcomp thrdvar thread ); $ckfunc = 0; LINE: while (<CPP>) { while (/^#.*vmsish\.h/i .. /^#.*perl\.h/i) { @@ -213,7 +222,6 @@ LINE: while (<CPP>) { # Pull name from library module or header filespec $spec =~ /^(\w+)$/ or $spec =~ /(\w+)\.h/i; my $name = lc $1; - $name = 'perlio' if $name eq 'perliol'; $ckfunc = exists $checkh{$name} ? 1 : 0; $scanname = $name if $ckfunc; print "Header file transition: ckfunc = $ckfunc for $name.h\n" if $debug > 1; |