Content-Length: 299903 | pFad | http://github.com/postgrespro/postgres_cluster/commit/59f9cd9dd5e4db8c59c57a17388c17564a3211a3

62 Fix build failure on header generation with repetitive builds of MSVC · postgrespro/postgres_cluster@59f9cd9 · GitHub
Skip to content

Commit 59f9cd9

Browse files
committed
Fix build failure on header generation with repetitive builds of MSVC
GenerateConfigHeader() in Solution.pm was complaining about unused define symbols even if a newer config header was not generated, causing successive build attempts with MSVC to fail. Oversight in commit 8f4fb4c. Author: Kyotaro Horiguchi Reviewed-by: Juan José Santamaría Flecha Discussion: https://postgr.es/m/20200218.160500.44393633318853097.horikyota.ntt@gmail.com
1 parent 3639071 commit 59f9cd9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/tools/msvc/Solution.pm

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -826,13 +826,14 @@ EOF
826826
sub GenerateConfigHeader
827827
{
828828
my ($self, $config_header, $defines, $required) = @_;
829-
my %defines_copy = %$defines;
830829

831830
my $config_header_in = $config_header . '.in';
832831

833832
if (IsNewer($config_header, $config_header_in) ||
834833
IsNewer($config_header, __FILE__))
835834
{
835+
my %defines_copy = %$defines;
836+
836837
open(my $i, '<', $config_header_in)
837838
|| confess "Could not open $config_header_in\n";
838839
open(my $o, '>', $config_header)
@@ -871,10 +872,11 @@ sub GenerateConfigHeader
871872
}
872873
close($o);
873874
close($i);
874-
}
875-
if ($required && scalar(keys %defines_copy) > 0)
876-
{
877-
croak "unused defines: " . join(' ', keys %defines_copy);
875+
876+
if ($required && scalar(keys %defines_copy) > 0)
877+
{
878+
croak "unused defines: " . join(' ', keys %defines_copy);
879+
}
878880
}
879881
}
880882

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/59f9cd9dd5e4db8c59c57a17388c17564a3211a3

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy