Skip to content

Commit 91572ee

Browse files
committed
Make pg_dumpall build with the right object files under MSVC.
This fixes a longstanding but up to now benign bug in the way pg_dumpall was built. The bug was exposed by recent code adjustments. The Makefile does not use $(OBJS) to build pg_dumpall, so this fix removes their source files from the pg_dumpall object and adds in the one source file it consequently needs.
1 parent 9f4563f commit 91572ee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/tools/msvc/Mkvcbuild.pm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,17 @@ sub mkvcbuild
344344
$pgdump->AddFile('src\backend\parser\kwlookup.c');
345345

346346
my $pgdumpall = AddSimpleFrontend('pg_dump', 1);
347+
# pg_dumpall doesn't use the files in the Makefile's $(OBJS), unlike
348+
# pg_dump and pg_restore.
349+
# So remove their sources from the object, keeping the other setup that
350+
# AddSimpleFrontend() has done.
351+
my @nodumpall = grep { m/src\\bin\\pg_dump\\.*\.c$/ }
352+
keys %{$pgdumpall->{files}};
353+
delete @{$pgdumpall->{files}}{@nodumpall};
347354
$pgdumpall->{name} = 'pg_dumpall';
348355
$pgdumpall->AddIncludeDir('src\backend');
349356
$pgdumpall->AddFile('src\bin\pg_dump\pg_dumpall.c');
357+
$pgdumpall->AddFile('src\bin\pg_dump\dumputils.c');
350358
$pgdumpall->AddFile('src\bin\pg_dump\keywords.c');
351359
$pgdumpall->AddFile('src\backend\parser\kwlookup.c');
352360

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy