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)
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