Thread: pgsql: Support building with Visual Studio 2015

pgsql: Support building with Visual Studio 2015

From
Andrew Dunstan
Date:
Support building with Visual Studio 2015

Adjust the way we detect the locale. As a result the minumum Windows
version supported by VS2015 and later is Windows Vista. Add some tweaks
to remove new compiler warnings. Remove documentation references to the
now obsolete msysGit.

Michael Paquier, somewhat edited by me, reviewed by Christian Ullrich.

Backpatch to 9.5

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/da52474f3d3cbdf38d8a6677a4ebedaf402ade3a

Modified Files
--------------
doc/src/sgml/install-windows.sgml     | 29 +++++++++--------
src/backend/port/win32/crashdump.c    | 14 ++++++++
src/bin/pg_basebackup/pg_basebackup.c |  9 ++++--
src/include/port/win32.h              | 22 ++++++++++---
src/port/chklocale.c                  | 61 +++++++++++++++++++++++++++--------
src/port/win32env.c                   |  3 ++
src/tools/msvc/MSBuildProject.pm      | 23 +++++++++++++
src/tools/msvc/Solution.pm            | 26 +++++++++++++++
src/tools/msvc/VSObjectFactory.pm     | 12 +++++--
9 files changed, 165 insertions(+), 34 deletions(-)


Re: pgsql: Support building with Visual Studio 2015

From
Christian Ullrich
Date:
* Andrew Dunstan wrote:

> Support building with Visual Studio 2015
> http://git.postgresql.org/pg/commitdiff/da52474f3d3cbdf38d8a6677a4ebedaf402ade3a

diff --git a/src/port/win32env.c b/src/port/win32env.c
index 7e4ff62..d6b0ebe 100644 (file)
--- a/src/port/win32env.c
+++ b/src/port/win32env.c
@@ -70,6 +70,9 @@ pgwin32_putenv(const char *envval)
             "msvcr120", 0, NULL
         },                      /* Visual Studio 2013 */
         {
+           "urctbase", 0, NULL
+       },                      /* Visual Studio 2015 and later */
+       {
             NULL, 0, NULL
         }
     };

s/urctbase/ucrtbase/

Sorry, I missed that this morning.

--
Christian




Re: pgsql: Support building with Visual Studio 2015

From
Andrew Dunstan
Date:

On 04/29/2016 09:29 AM, Christian Ullrich wrote:
> * Andrew Dunstan wrote:
>
>> Support building with Visual Studio 2015
>> http://git.postgresql.org/pg/commitdiff/da52474f3d3cbdf38d8a6677a4ebedaf402ade3a
>>
>
> diff --git a/src/port/win32env.c b/src/port/win32env.c
> index 7e4ff62..d6b0ebe 100644 (file)
> --- a/src/port/win32env.c
> +++ b/src/port/win32env.c
> @@ -70,6 +70,9 @@ pgwin32_putenv(const char *envval)
>             "msvcr120", 0, NULL
>         },                      /* Visual Studio 2013 */
>         {
> +           "urctbase", 0, NULL
> +       },                      /* Visual Studio 2015 and later */
> +       {
>             NULL, 0, NULL
>         }
>     };
>
> s/urctbase/ucrtbase/
>
> Sorry, I missed that this morning.
>


Oh, darn, thanks. Will fix.

cheers

andrew



Re: pgsql: Support building with Visual Studio 2015

From
Alvaro Herrera
Date:
Andrew Dunstan wrote:
> Support building with Visual Studio 2015
>
> Adjust the way we detect the locale. As a result the minumum Windows
> version supported by VS2015 and later is Windows Vista. Add some tweaks
> to remove new compiler warnings. Remove documentation references to the
> now obsolete msysGit.
>
> Michael Paquier, somewhat edited by me, reviewed by Christian Ullrich.

Great team work here, kudos.  You forgot to mention Petr Jelínek as
co-author in the credits.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services