Re: Reduce the number of special cases to build contrib modules on windows - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Reduce the number of special cases to build contrib modules on windows
Date
Msg-id 20210419162430.GA27463@alvherre.pgsql
Whole thread Raw
In response to Re: Reduce the number of special cases to build contrib modules on windows  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Reduce the number of special cases to build contrib modules on windows
List pgsql-hackers
> diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm
> index ebb169e201..68606a296d 100644
> --- a/src/tools/msvc/MSBuildProject.pm
> +++ b/src/tools/msvc/MSBuildProject.pm
> @@ -310,11 +310,12 @@ sub WriteItemDefinitionGroup
>      my $targetmachine =
>        $self->{platform} eq 'Win32' ? 'MachineX86' : 'MachineX64';
>  
> -    my $includes = $self->{includes};
> -    unless ($includes eq '' or $includes =~ /;$/)
> +    my $includes = "";
> +    foreach my $inc (@{ $self->{includes} })
>      {
> -        $includes .= ';';
> +        $includes .= $inc . ";";
>      }

Perl note: you can do this more easily as 

  my $includes = join ';', @{$self->{includes}};
  $includes .= ';' unless $includes eq '';

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
 Are you not unsure you want to delete Firefox?
       [Not unsure]     [Not not unsure]    [Cancel]
                   http://smylers.hates-software.com/2008/01/03/566e45b2.html



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE
Next
From: Andrew Dunstan
Date:
Subject: Re: Windows default locale vs initdb