From 7f94a5c106f88d5abbcc84e545962208fac9c232 Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu, 10 Dec 2015 10:19:13 -0500
Subject: [PATCH] Accept flex > 2.5.x on Windows, too.

Commit 32f15d05c fixed this in configure, but missed the similar check
in the MSVC scripts.

Michael Paquier, per report from Victor Wagner
---
 src/tools/msvc/pgflex.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/tools/msvc/pgflex.pl b/src/tools/msvc/pgflex.pl
index 259f2187ed3..50c5eb014e0 100644
--- a/src/tools/msvc/pgflex.pl
+++ b/src/tools/msvc/pgflex.pl
@@ -16,7 +16,8 @@ my ($flexver) = `flex -V`;    # grab first line
 $flexver = (split(/\s+/, $flexver))[1];
 $flexver =~ s/[^0-9.]//g;
 my @verparts = split(/\./, $flexver);
-unless ($verparts[0] == 2 && $verparts[1] == 5 && $verparts[2] >= 31)
+unless ($verparts[0] == 2 &&
+	    ($verparts[1] > 5 || ($verparts[1] == 5 && $verparts[2] >= 31)))
 {
 	print "WARNING! Flex install not found, or unsupported Flex version.\n";
 	print "echo Attempting to build without.\n";
-- 
GitLab