From: Jarkko Hietaniemi Date: Fri, 8 Mar 2002 22:54:50 +0000 (+0000) Subject: More portability. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c8688140bd64a2d3d14b3af91b889a363c72ea56;p=p5sagit%2Fp5-mst-13.2.git More portability. p4raw-id: //depot/perl@15124 --- diff --git a/Porting/findrfuncs b/Porting/findrfuncs index c4a2985..c13643e 100644 --- a/Porting/findrfuncs +++ b/Porting/findrfuncs @@ -26,6 +26,7 @@ if (open(CONFIG, "config.sh")) { my $CONFIG = ; $SO = $1 if $CONFIG =~ /^so='(\w+)'/m; $EXE = $1 if $CONFIG =~ /^_exe='\.(\w+)'/m; + close(CONFIG); } push @EXES, "perl$EXE"; @@ -36,6 +37,8 @@ push @EXES, @ARGV; if ($^O eq 'dec_osf') { $NMU = 'nm -Bu'; +} elsif ($^O eq 'irix') { + $NMU = 'nm -pu'; } my %rfuncs; @@ -48,7 +51,7 @@ find(sub { while (defined ($line = <$F>)) { if ($line =~ /\b(\w+_r)\b/) { #warn "$1 => $File::Find::name\n"; - $rfuncs{$1} = $File::Find::name; + $rfuncs{$1}->{$File::Find::name}++; } } close $F; @@ -60,10 +63,11 @@ delete $rfuncs{setlocale_r} if $^O eq 'linux'; my %syms; for my $exe (@EXES) { + # warn "#--- $exe\n"; for my $sym (`$NMU $exe`) { chomp $sym; - $sym =~ s/^\s+[Uu]\s+//; $sym =~ s/^\s+//; + $sym =~ s/^([0-9A-Fa-f]+\s+)?[Uu]\s+//; next if /\s/; $sym =~ s/\@.*\z//; # remove @@GLIBC_2.0 etc # warn "#### $sym\n"; @@ -75,7 +79,8 @@ for my $exe (@EXES) { if (@syms) { print "\nFollowing symbols in $exe have reentrant versions:\n"; for my $sym (@syms) { - print "$sym => $sym" . "_r (in file " . $rfuncs{"${sym}_r"} . ")\n"; + my @f = sort keys %{$rfuncs{$sym . '_r'}}; + print "$sym => $sym" . "_r (@f)\n"; } } @syms = ();