aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2007-01-10 04:02:05 +0000
committerNeil Conway <neilc@samurai.com>2007-01-10 04:02:05 +0000
commit5f6d735356c9090d87e184c9322bfe37a165a014 (patch)
treeca103beb612f3a1371a872a1bec1216f6f378175 /src
parent840df5156abbee505b7fd299244fb929fa363008 (diff)
downloadpostgresql-5f6d735356c9090d87e184c9322bfe37a165a014.tar.gz
postgresql-5f6d735356c9090d87e184c9322bfe37a165a014.zip
Attached patch fixes two problems:
1) gendef works from inside visual studio - use a tempfile instead of redirection, because for some reason you can't redirect dumpbin from inside (patch from Joachim Wieland) 2) gendef must process only *.obj, or you get weird errors in some build scenarios when it tries to process a logfile Magnus Hagander
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/gendef.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/msvc/gendef.pl b/src/tools/msvc/gendef.pl
index d5d9bc78c7d..675d8423b40 100644
--- a/src/tools/msvc/gendef.pl
+++ b/src/tools/msvc/gendef.pl
@@ -10,9 +10,10 @@ if (-f "$ARGV[0]/$defname.def") {
print "Generating $defname.DEF from directory $ARGV[0]\n";
-while (<$ARGV[0]/*>) {
+while (<$ARGV[0]/*.obj>) {
print ".";
- open(F,"dumpbin /symbols $_|") || die "Could not open $_\n";
+ 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/;
@@ -31,6 +32,7 @@ while (<$ARGV[0]/*>) {
push @def, $pieces[6];
}
close(F);
+ unlink("symbols.out");
}
print "\n";