diff options
| author | Michael Paquier | 2022-07-07 04:25:45 +0000 |
|---|---|---|
| committer | Michael Paquier | 2022-07-07 04:25:45 +0000 |
| commit | 495ed0ef2d72a6a74def296e042022479d5d07bd (patch) | |
| tree | 5a28086ee3887217ed767d4949b3a6bdb19a4b2d /src/include | |
| parent | d547f7cf5efc531be8587641a5682cc46b37bc81 (diff) | |
Make Windows 10 the minimal runtime requirement for WIN32
This commit bumps the runtime value of _WIN32_WINNT to be 0x0A00 for any
builds on Windows. Hence, this makes Windows 10 the minimal requirement
when running PostgreSQL under WIN32, be it for builds of Cygwin, MinGW
or Visual Studio.
The previous minimal runtime version was either Windows Vista when
building with at least Visual Studio 2015 or Windows XP for the rest.
Windows 10 is the most modern version supported by Microsoft, and per
discussion, as we don't have buildfarm members that run older versions
anymore, this is the minimal supported version that suits better for our
needs. This will actually make easier the development of some patches,
two being async I/O and large page handling by avoiding a lot of
compatibility gotchas, on platforms that have most likely few users
anyway.
It is possible to remove MIN_WINNT in win32.h and the macros
IsWindowsXXXOrGreater() that were used in the code at runtime to check
which version of Windows was getting used. The change in pg_locale.c
comes from Juan. Note that all my tests passed, and that the CI is
green. The buildfarm will quickly tell if this needs more adjustments.
Author: Michael Paquier, Juan José SantamarÃa Flecha
Reviewed-by: Thomas Munro
Discussion: https://postgr.es/m/Yo7tHKD8VCkeNi71@paquier.xyz
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/port/win32.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/include/port/win32.h b/src/include/port/win32.h index c6213c77c3..5f3b17a500 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -11,24 +11,13 @@ /* * Make sure _WIN32_WINNT has the minimum required value. - * Leave a higher value in place. When building with at least Visual - * Studio 2015 the minimum requirement is Windows Vista (0x0600) to - * get support for GetLocaleInfoEx() with locales. For everything else - * the minimum version is Windows XP (0x0501). + * Leave a higher value in place. The minimum requirement is Windows 10. */ -#if defined(_MSC_VER) && _MSC_VER >= 1900 -#define MIN_WINNT 0x0600 -#else -#define MIN_WINNT 0x0501 -#endif - -#if defined(_WIN32_WINNT) && _WIN32_WINNT < MIN_WINNT +#ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif -#ifndef _WIN32_WINNT -#define _WIN32_WINNT MIN_WINNT -#endif +#define _WIN32_WINNT 0x0A00 /* * We need to prevent <crtdefs.h> from defining a symbol conflicting with |
