From 6203583b72b58272010f8d06999811ff39922acf Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Thu, 14 Jul 2022 11:22:49 +0900 Subject: [PATCH] Remove support for Visual Studio 2013 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No members of the buildfarm are using this version of Visual Studio, resulting in all the code cleaned up here as being mostly dead, and VS2017 is the oldest version still supported. More versions could be cut, but the gain would be minimal, while removing only VS2013 has the advantage to remove from the core code all the dependencies on the value defined by _MSC_VER, where compatibility tweaks have accumulated across the years mostly around locales and strtof(), so that's a nice isolated cleanup. Note that this commit additionally allows a revert of 3154e16. The versions of Visual Studio now supported range from 2015 to 2022. Author: Michael Paquier Reviewed-by: Juan José Santamaría Flecha, Tom Lane, Thomas Munro, Justin Pryzby Discussion: https://postgr.es/m/YoH2IMtxcS3ncWn+@paquier.xyz --- configure | 7 ++--- configure.ac | 7 ++--- doc/src/sgml/install-windows.sgml | 8 ++---- src/backend/main/main.c | 5 ---- src/backend/optimizer/path/costsize.c | 4 +-- src/backend/utils/adt/float.c | 6 +--- src/backend/utils/adt/pg_locale.c | 40 --------------------------- src/include/port/win32_port.h | 7 +---- src/port/chklocale.c | 33 ++++------------------ src/port/strtof.c | 9 ------ src/tools/msvc/MSBuildProject.pm | 27 +----------------- src/tools/msvc/README | 8 +++--- src/tools/msvc/Solution.pm | 28 ------------------- src/tools/msvc/VSObjectFactory.pm | 12 ++------ 14 files changed, 24 insertions(+), 177 deletions(-) diff --git a/configure b/configure index a90be038210..1e63c6862bc 100755 --- a/configure +++ b/configure @@ -16809,10 +16809,9 @@ fi if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then # Cygwin and (apparently, based on test results) Mingw both - # have a broken strtof(), so substitute the same replacement - # code we use with VS2013. That's not a perfect fix, since - # (unlike with VS2013) it doesn't avoid double-rounding, but - # we have no better options. To get that, though, we have to + # have a broken strtof(), so substitute its implementation. + # That's not a perfect fix, since it doesn't avoid double-rounding, + # but we have no better options. To get that, though, we have to # force the file to be compiled despite HAVE_STRTOF. case " $LIBOBJS " in *" strtof.$ac_objext "* ) ;; diff --git a/configure.ac b/configure.ac index 7fbfb6795fe..71191f14ad7 100644 --- a/configure.ac +++ b/configure.ac @@ -1919,10 +1919,9 @@ fi if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then # Cygwin and (apparently, based on test results) Mingw both - # have a broken strtof(), so substitute the same replacement - # code we use with VS2013. That's not a perfect fix, since - # (unlike with VS2013) it doesn't avoid double-rounding, but - # we have no better options. To get that, though, we have to + # have a broken strtof(), so substitute its implementation. + # That's not a perfect fix, since it doesn't avoid double-rounding, + # but we have no better options. To get that, though, we have to # force the file to be compiled despite HAVE_STRTOF. AC_LIBOBJ([strtof]) AC_MSG_NOTICE([On $host_os we will use our strtof wrapper.]) diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml index 66567d17a04..afb004b5cf0 100644 --- a/doc/src/sgml/install-windows.sgml +++ b/doc/src/sgml/install-windows.sgml @@ -22,7 +22,7 @@ Windows. The simplest way to build with Microsoft tools is to install Visual Studio 2022 and use the included compiler. It is also possible to build with the full - Microsoft Visual C++ 2013 to 2022. + Microsoft Visual C++ 2015 to 2022. In some cases that requires the installation of the Windows SDK in addition to the compiler. @@ -77,15 +77,13 @@ Both 32-bit and 64-bit builds are possible with the Microsoft Compiler suite. 32-bit PostgreSQL builds are possible with - Visual Studio 2013 to + Visual Studio 2015 to Visual Studio 2022, as well as standalone Windows SDK releases 8.1a to 10. 64-bit PostgreSQL builds are supported with Microsoft Windows SDK version 8.1a to 10 or - Visual Studio 2013 and above. + Visual Studio 2015 and above.