From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix msvc builds for ActivePerl > 5.24 |
Date: | 2018-03-04 17:04:54 |
Message-ID: | CABUevEwBoo1Cm0Vew_5mQ+QzWB0h8avMz_bnaZ7KB3Tfc=UE1g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Sat, Mar 3, 2018 at 9:00 AM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> On Fri, Mar 02, 2018 at 11:42:32AM +0000, Magnus Hagander wrote:
> > Fix msvc builds for ActivePerl > 5.24
>
> > --- a/src/tools/msvc/Mkvcbuild.pm
> > +++ b/src/tools/msvc/Mkvcbuild.pm
> > @@ -524,9 +524,11 @@ sub mkvcbuild
> > my $perl_path = $solution->{options}->{perl} .
> '\lib\CORE\*perl*';
> >
> > # ActivePerl 5.16 provided perl516.lib; 5.18 provided
> libperl518.a
> > + # Starting with ActivePerl 5.24, both perlnn.lib and
> libperlnn.a are provided.
> > + # In this case, prefer .lib.
>
> Sounds reasonable, but ...
>
> > my @perl_libs =
> > grep { /perl\d+\.lib$|libperl\d+\.a$/ } glob($perl_path);
> > - if (@perl_libs == 1)
> > + if (@perl_libs > 0)
> > {
> > $plperl->AddLibrary($perl_libs[0]);
> > }
>
> ... the behavior doesn't match the comment. By default, glob() sorts by
> ASCII
> value, so @perl_libs = qw(libperl524.a perl524.lib).
>
That's what I get for actually assuming the submission matched the
description, and not properly testing.
Not being a perl guy, I've committed what I think is a correct fix.
Thanks for the spot!
--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2018-03-04 17:04:56 | pgsql: Actually pick .lib file when multiple perl libs are present |
Previous Message | Peter Eisentraut | 2018-03-04 15:37:26 | pgsql: PL/pgSQL: Simplify RETURN checking for procedures |