X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=vms%2Fgen_shrfls.pl;h=98afe30c17a0e87b0649daab77fb0bd4c984ec94;hb=903fe02ab005d9a6f5d2870ed93bddff5a74bffb;hp=6fb1bb9d00565e1376b68b830f7c8f4f8bfc38db;hpb=c46ec1f410f930810c1c3e760696951bc26b1248;p=p5sagit%2Fp5-mst-13.2.git diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl index 6fb1bb9..98afe30 100644 --- a/vms/gen_shrfls.pl +++ b/vms/gen_shrfls.pl @@ -60,6 +60,10 @@ $isvax = `\$ Write Sys\$Output \(F\$GetSyI(\"HW_MODEL\") .LE. 1024 .AND. F\$GetS chomp $isvax; print "\$isvax: \\$isvax\\\n" if $debug; +$isi64 = `\$ Write Sys\$Output \(F\$GetSyI(\"HW_MODEL\") .GE. 4096)`; +chomp $isi64; +print "\$isi64: \\$isi64\\\n" if $debug; + print "Input \$cc_cmd: \\$cc_cmd\\\n" if $debug; $docc = ($cc_cmd !~ /^~~/); print "\$docc = $docc\n" if $debug; @@ -146,17 +150,19 @@ sub scan_var { } sub scan_func { - my($line) = @_; - - print "\tchecking for global routine\n" if $debug > 1; - $line =~ s/\b(IV|Off_t|Size_t|SSize_t|void)\b//i; - if ( $line =~ /(\w+)\s*\(/ ) { - print "\troutine name is \\$1\\\n" if $debug > 1; - if ($1 eq 'main' || $1 eq 'perl_init_ext' || $1 eq '__attribute__format__' - || (($1 eq 'Perl_stashpv_hvname_match') && ! $use_threads)) { - print "\tskipped\n" if $debug > 1; + my @lines = split /;/, @_[0]; + + for my $line (@lines) { + print "\tchecking for global routine\n" if $debug > 1; + $line =~ s/\b(IV|Off_t|Size_t|SSize_t|void)\b//i; + if ( $line =~ /(\w+)\s*\(/ ) { + print "\troutine name is \\$1\\\n" if $debug > 1; + if ($1 eq 'main' || $1 eq 'perl_init_ext' || $1 eq '__attribute__format__' + || $1 eq 'sizeof' || (($1 eq 'Perl_stashpv_hvname_match') && ! $use_threads)) { + print "\tskipped\n" if $debug > 1; + } + else { $fcns{$1}++ } } - else { $fcns{$1}++ } } } @@ -182,7 +188,7 @@ if ($docc) { else { open(CPP,"$cpp_file") or die "$0: Can't read preprocessed file $cpp_file: $!\n"; } -%checkh = map { $_,1 } qw( thread bytecode byterun proto perlio perlvars intrpvar thrdvar ); +%checkh = map { $_,1 } qw( thread bytecode byterun proto perlapi perlio perlvars intrpvar thrdvar ); $ckfunc = 0; LINE: while () { while (/^#.*vmsish\.h/i .. /^#.*perl\.h/i) { @@ -256,8 +262,14 @@ if ($isvax) { } unless ($isgcc) { - print OPTBLD "PSECT_ATTR=\$GLOBAL_RO_VARS,PIC,NOEXE,RD,NOWRT,SHR\n"; - print OPTBLD "PSECT_ATTR=\$GLOBAL_RW_VARS,PIC,NOEXE,RD,WRT,NOSHR\n"; + if ($isi64) { + print OPTBLD "PSECT_ATTR=\$GLOBAL_RO_VARS,NOEXE,RD,NOWRT,SHR\n"; + print OPTBLD "PSECT_ATTR=\$GLOBAL_RW_VARS,NOEXE,RD,WRT,NOSHR\n"; + } + else { + print OPTBLD "PSECT_ATTR=\$GLOBAL_RO_VARS,PIC,NOEXE,RD,NOWRT,SHR\n"; + print OPTBLD "PSECT_ATTR=\$GLOBAL_RW_VARS,PIC,NOEXE,RD,WRT,NOSHR\n"; + } } print OPTBLD "case_sensitive=yes\n" if $care_about_case; foreach $var (sort (keys %vars,keys %cvars)) {