aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2020-04-17 14:44:33 -0400
committerAndrew Dunstan <andrew@dunslane.net>2020-04-17 14:44:33 -0400
commita9659fb65497af8d2db66101f2ff7233d02997f1 (patch)
treee3c6cbe88a5d8d85683303d43d5fb103f7574cfa /src
parent9e24109f1a4e4d8d1d372b004d6a0dd06e673fe7 (diff)
downloadpostgresql-a9659fb65497af8d2db66101f2ff7233d02997f1.tar.gz
postgresql-a9659fb65497af8d2db66101f2ff7233d02997f1.zip
Use a slightly more liberal regex to detect Visual Studio version
Apparently in some language versions of Visual Studio nmake outputs some material after the version number and before the end of the line. This has been seen in Chinese versions. Therefore, we no longer demand that the version string comes at the end of a line. Per complaint from Cuiping Lin. Backpatch to all live branches.
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/VSObjectFactory.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/msvc/VSObjectFactory.pm b/src/tools/msvc/VSObjectFactory.pm
index e6983b241fb..54125400612 100644
--- a/src/tools/msvc/VSObjectFactory.pm
+++ b/src/tools/msvc/VSObjectFactory.pm
@@ -120,7 +120,7 @@ sub DetermineVisualStudioVersion
$? >> 8 == 0
or croak
"Unable to determine Visual Studio version: The nmake command wasn't found.";
- if ($output =~ /(\d+)\.(\d+)\.\d+(\.\d+)?$/m)
+ if ($output =~ /(\d+)\.(\d+)\.\d+(\.\d+)?/)
{
return _GetVisualStudioVersion($1, $2);
}