]> granicus.if.org Git - postgresql/commitdiff
Actually pick .lib file when multiple perl libs are present
authorMagnus Hagander <magnus@hagander.net>
Sun, 4 Mar 2018 17:00:16 +0000 (18:00 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sun, 4 Mar 2018 17:01:25 +0000 (18:01 +0100)
7240962f8626ff09bb8f9e71ecdb074775bdd035 got it right in the comment,
but the code did not actually do what the comment said. Fix that.

Issue pointed out by Noah Misch.

src/tools/msvc/Mkvcbuild.pm

index 123292f48d8f3bfce1d42299a8ca31f8d9ffa4f3..72976f44d8e18f8fbb599f2bfe28b4b5d7ab48bd 100644 (file)
@@ -527,7 +527,7 @@ sub mkvcbuild
                # Starting with ActivePerl 5.24, both  perlnn.lib and libperlnn.a are provided.
                # In this case, prefer .lib.
                my @perl_libs =
-                 grep { /perl\d+\.lib$|libperl\d+\.a$/ } glob($perl_path);
+                 reverse sort grep { /perl\d+\.lib$|libperl\d+\.a$/ } glob($perl_path);
                if (@perl_libs > 0)
                {
                        $plperl->AddLibrary($perl_libs[0]);