Re: Reduce the number of special cases to build contrib modules on windows

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Reduce the number of special cases to build contrib modules on windows
Дата
Msg-id 1da51443-6b47-d012-cfda-254c353c5148@dunslane.net
обсуждение исходный текст
Ответ на Re: Reduce the number of special cases to build contrib modules on windows  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: Reduce the number of special cases to build contrib modules on windows
Список pgsql-hackers
On 4/19/21 12:24 PM, Alvaro Herrera wrote:
>> 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 '';
>

or even more simply:


    my $includes = join ';', @{$self->{includes}}, "";

cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Allowing to create LEAKPROOF functions to non-superuser
Следующее
От: Tom Lane
Дата:
Сообщение: Re: "could not find pathkey item to sort" for TPC-DS queries 94-96