File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 22#
33# Script that generates a .DEF file for all objects in a directory
44#
5- # $PostgreSQL: pgsql/src/tools/msvc/gendef.pl,v 1.6 2007/05/03 14:04:03 mha Exp $
5+ # $PostgreSQL: pgsql/src/tools/msvc/gendef.pl,v 1.7 2008/01/31 03:26:14 adunstan Exp $
66#
77
88die " Usage: gendef.pl <modulepath>\n " unless ($ARGV [0] =~ / \\ ([^\\ ]+$) / );
1818
1919while (<$ARGV [0]/*.obj>)
2020{
21+ my $symfile = $_ ;
22+ $symfile =~ s /\. obj$/ .sym/ i ;
2123 print " ." ;
2224 system (" dumpbin /symbols /out:symbols.out $_ >NUL" ) && die " Could not call dumpbin" ;
2325 open (F, " <symbols.out" ) || die " Could not open symbols.out for $_ \n " ;
2426 while (<F>)
2527 {
2628 s /\(\) // g ;
27- next unless / ^\d / ;
2829 my @pieces = split ;
30+ next unless $pieces [0] =~ / ^[A-F0-9]{3}$ / ;
2931 next unless $pieces [6];
3032 next if ($pieces [2] eq " UNDEF" );
3133 next unless ($pieces [4] eq " External" );
4143 push @def , $pieces [6];
4244 }
4345 close (F);
44- unlink (" symbols.out" );
46+ rename (" symbols.out" , $symfile );
4547}
4648print " \n " ;
4749
You can’t perform that action at this time.
0 commit comments