aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_ctl/pg_ctl.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2019-10-08 10:27:30 +0200
committerPeter Eisentraut <peter@eisentraut.org>2019-10-08 10:50:54 +0200
commit38d8dce61fff09daae0edb6bcdd42b0c7f10ebcd (patch)
treeb590d669ebe12f434b403643b0fcaa12b92cd91e /src/bin/pg_ctl/pg_ctl.c
parenta7471bd85c05f849e88d6cfe9da3c795008e8f2e (diff)
downloadpostgresql-38d8dce61fff09daae0edb6bcdd42b0c7f10ebcd.tar.gz
postgresql-38d8dce61fff09daae0edb6bcdd42b0c7f10ebcd.zip
Remove some code for old unsupported versions of MSVC
As of d9dd406fe281d22d5238d3c26a7182543c711e74, we require MSVC 2013, which means _MSC_VER >= 1800. This means that conditionals about older versions of _MSC_VER can be removed or simplified. Previous code was also in some cases handling MinGW, where _MSC_VER is not defined at all, incorrectly, such as in pg_ctl.c and win32_port.h, leading to some compiler warnings. This should now be handled better. Reviewed-by: Michael Paquier <michael@paquier.xyz>
Diffstat (limited to 'src/bin/pg_ctl/pg_ctl.c')
-rw-r--r--src/bin/pg_ctl/pg_ctl.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 316651ced28..eac4e771ab7 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -137,12 +137,7 @@ static void print_msg(const char *msg);
static void adjust_data_dir(void);
#ifdef WIN32
-#if (_MSC_VER >= 1800)
#include <versionhelpers.h>
-#else
-static bool IsWindowsXPOrGreater(void);
-static bool IsWindows7OrGreater(void);
-#endif
static bool pgwin32_IsInstalled(SC_HANDLE);
static char *pgwin32_CommandLine(bool);
static void pgwin32_doRegister(void);
@@ -1378,32 +1373,6 @@ do_kill(pgpid_t pid)
#ifdef WIN32
-#if (_MSC_VER < 1800)
-static bool
-IsWindowsXPOrGreater(void)
-{
- OSVERSIONINFO osv;
-
- osv.dwOSVersionInfoSize = sizeof(osv);
-
- /* Windows XP = Version 5.1 */
- return (!GetVersionEx(&osv) || /* could not get version */
- osv.dwMajorVersion > 5 || (osv.dwMajorVersion == 5 && osv.dwMinorVersion >= 1));
-}
-
-static bool
-IsWindows7OrGreater(void)
-{
- OSVERSIONINFO osv;
-
- osv.dwOSVersionInfoSize = sizeof(osv);
-
- /* Windows 7 = Version 6.0 */
- return (!GetVersionEx(&osv) || /* could not get version */
- osv.dwMajorVersion > 6 || (osv.dwMajorVersion == 6 && osv.dwMinorVersion >= 0));
-}
-#endif
-
static bool
pgwin32_IsInstalled(SC_HANDLE hSCM)
{