aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2008-01-31 03:26:14 +0000
committerAndrew Dunstan <andrew@dunslane.net>2008-01-31 03:26:14 +0000
commit0a4ef62bf883f72b5e9ac50b979691c1ab55f644 (patch)
treef7b240f2657271f428511cfadc427bbc9601864f
parent0688d84041f7963a2a00468c53aec7bb6051ef5c (diff)
downloadpostgresql-0a4ef62bf883f72b5e9ac50b979691c1ab55f644.tar.gz
postgresql-0a4ef62bf883f72b5e9ac50b979691c1ab55f644.zip
Fix test that wrongly excluded some dumpbin symbols.
Keep the intermediate symbol file rather then blowing it away, for easier debugging.
-rw-r--r--src/tools/msvc/gendef.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/msvc/gendef.pl b/src/tools/msvc/gendef.pl
index 7bd32cbf9a4..27ed132a522 100644
--- a/src/tools/msvc/gendef.pl
+++ b/src/tools/msvc/gendef.pl
@@ -2,7 +2,7 @@ my @def;
#
# Script that generates a .DEF file for all objects in a directory
#
-# $PostgreSQL: pgsql/src/tools/msvc/gendef.pl,v 1.6 2007/05/03 14:04:03 mha Exp $
+# $PostgreSQL: pgsql/src/tools/msvc/gendef.pl,v 1.7 2008/01/31 03:26:14 adunstan Exp $
#
die "Usage: gendef.pl <modulepath>\n" unless ($ARGV[0] =~ /\\([^\\]+$)/);
@@ -18,14 +18,16 @@ print "Generating $defname.DEF from directory $ARGV[0]\n";
while (<$ARGV[0]/*.obj>)
{
+ my $symfile = $_;
+ $symfile=~ s/\.obj$/.sym/i;
print ".";
system("dumpbin /symbols /out:symbols.out $_ >NUL") && die "Could not call dumpbin";
open(F, "<symbols.out") || die "Could not open symbols.out for $_\n";
while (<F>)
{
s/\(\)//g;
- next unless /^\d/;
my @pieces = split;
+ next unless $pieces[0] =~ /^[A-F0-9]{3}$/;
next unless $pieces[6];
next if ($pieces[2] eq "UNDEF");
next unless ($pieces[4] eq "External");
@@ -41,7 +43,7 @@ while (<$ARGV[0]/*.obj>)
push @def, $pieces[6];
}
close(F);
- unlink("symbols.out");
+ rename("symbols.out",$symfile);
}
print "\n";