pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christian Ullrich <chris@chrullrich.net>
To: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Petr Jelinek <petr@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: VS 2015 support in src/tools/msvc
Date: Sun, 24 Apr 2016 21:29:30 +0200
Message-ID: <d4c1916b-56de-c594-3dba-03cf550bc778@chrullrich.net> (raw)
In-Reply-To: <571CE6DC.9010501@dunslane.net>
References: <CAB7nPqTTcRGbDxS_RA4CWn1B_KRsvN+FTpct0mTp3v3gRWQ70g@mail.gmail.com>
	<5707E074.4030102@chrullrich.net>
	<CAB7nPqSYAxCX+p0D0Qpqv6D4uLb2fmGcpUeKRxMyom5cAziuzg@mail.gmail.com>
	<CAB7nPqSOPynjV7ZC9wghkvwTpDPj7U=py7AoczzguTmv1kmh+g@mail.gmail.com>
	<0B77CFCB-0F90-4CAB-8509-7EB391C06D59@chrullrich.net>
	<570A6A14.6040303@dunslane.net>
	<570A9FCE.5040201@chrullrich.net>
	<570ABFA0.4090403@2ndquadrant.com>
	<CAB7nPqRek6M6HKpNXiNHx0J+rzC0XUbuZ5EMGvHSxLuZsebtyg@mail.gmail.com>
	<CAB7nPqRNwNXQ6C_1kODE5kN0WQUqLuWtPdLD4rn5nGmJUiibLw@mail.gmail.com>
	<57192C59.9090903@dunslane.net>
	<AM2PR06MB069012E632FC3C8D1FC8AD6CD46E0@AM2PR06MB0690.eurprd06.prod.outlook.com>
	<CAB7nPqRfbNJC9m56zdDV3=ZSfg6VZG6t3aHHiKnS3PFOPrweVQ@mail.gmail.com>
	<571BD6D4.9@dunslane.net>
	<f9857fa2-0e86-f188-f23a-f182a4127f52@chrullrich.net>
	<571BED3C.5070! ! 209@dunslane.net>
	<17239.1461448469@sss.pgh.pa.us>
	<10891.1461450795@sss.pgh.pa.us>
	<571C3CA6.5070803@dunslane.net>
	<571CE6DC.9010501@dunslane.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

* Andrew Dunstan wrote:

> OK, here's my final version of the patch, which I will apply in 24 hours
> or so unless there is an objection.

+  <productname>Visual Studio 2008</productname> and above. Compilation
+  is supported down to <productname>Windows XP</productname> and
+  <productname>Windows Server 2003</> when building with
+  <productname>Visual Studio 2005</> to
+  <productname>Visual Studio 2013</productname>. Building with
+  <productname>Visual Studio 2015</productname> is supported down to
+  <productname>Windows Vista</> and <productname>Windows Server
    2008</>.

This paragraph contradicts itself; it first says 2008 is the minimum 
version, right after that it supports 2005, too. The last version of
Visual Studio that will install on XP, 2003, Vista, and 2008 is VS 2010 
anyway, anything released after that requires at least 7/2008R2.

I would actually just say "is supported with Visual Studio 2005 [or 
possibly 2008] and higher" instead of listing versions. I don't think we 
need to recapitulate the system requirements of individual VS releases 
and anyone trying to install 2012+ on Vista will quickly find out it 
doesn't work. It would be different if we actually excluded particular 
VS versions or VS/OS combinations that are supported by VS itself, but 
we don't.


+		/*
+		 * get a pointer sized version of bgchild to avoid
                 warnings about
+		 * casting to a different size on WIN64.
+		 */
+		intptr_t	bgchild_handle = bgchild;

If you're going to copy it anyway, why not just use a HANDLE rather than 
cast it again later? It's only used in two places, cast to HANDLE in 
both, and the special case of -1 does not matter in either.


+ * 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 minumum version os Windows XP (0x0501).

s/os/is/ in the last line.


This one doesn't matter, but just for perfection's sake:

+#if (_MSC_VER >= 1900)
+	uint32		cp;
+	WCHAR		wctype[80];
+
+	memset(wctype, 0, 80 * sizeof(WCHAR));
+	MultiByteToWideChar(CP_ACP, 0, ctype, -1, wctype, 80);

The maximum length is documented as 85 characters, also:

<https://msdn.microsoft.com/en-us/library/windows/desktop/dd373815(v=vs.85).aspx;: 
'Note   Your application must use the constant [LOCALE_NAME_MAX_LENGTH] 
for the maximum locale name length, instead of hard-coding the value "85".'

-- 
Christian



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (134+ messages)  latest in thread

Message-ID: <d4c1916b-56de-c594-3dba-03cf550bc778@chrullrich.net>
Permalink:  ../d4c1916b-56de-c594-3dba-03cf550bc778@chrullrich.net/
Also on:    postgresql.org/message-id/d4c1916b-56de-c594-3dba-03cf550bc778@chrullrich.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: chris@chrullrich.net, andrew@dunslane.net, tgl@sss.pgh.pa.us, michael.paquier@gmail.com, petr@2ndquadrant.com, robertmhaas@gmail.com, magnus@hagander.net
  Subject: Re: VS 2015 support in src/tools/msvc
  In-Reply-To: <d4c1916b-56de-c594-3dba-03cf550bc778@chrullrich.net>
  References: <CAB7nPqTTcRGbDxS_RA4CWn1B_KRsvN+FTpct0mTp3v3gRWQ70g@mail.gmail.com> <5707E074.4030102@chrullrich.net> <CAB7nPqSYAxCX+p0D0Qpqv6D4uLb2fmGcpUeKRxMyom5cAziuzg@mail.gmail.com> <CAB7nPqSOPynjV7ZC9wghkvwTpDPj7U=py7AoczzguTmv1kmh+g@mail.gmail.com> <0B77CFCB-0F90-4CAB-8509-7EB391C06D59@chrullrich.net> <570A6A14.6040303@dunslane.net> <570A9FCE.5040201@chrullrich.net> <570ABFA0.4090403@2ndquadrant.com> <CAB7nPqRek6M6HKpNXiNHx0J+rzC0XUbuZ5EMGvHSxLuZsebtyg@mail.gmail.com> <CAB7nPqRNwNXQ6C_1kODE5kN0WQUqLuWtPdLD4rn5nGmJUiibLw@mail.gmail.com> <57192C59.9090903@dunslane.net> <AM2PR06MB069012E632FC3C8D1FC8AD6CD46E0@AM2PR06MB0690.eurprd06.prod.outlook.com> <CAB7nPqRfbNJC9m56zdDV3=ZSfg6VZG6t3aHHiKnS3PFOPrweVQ@mail.gmail.com> <571BD6D4.9@dunslane.net> <f9857fa2-0e86-f188-f23a-f182a4127f52@chrullrich.net> <17239.1461448469@sss.pgh.pa.us> <10891.1461450795@sss.pgh.pa.us> <571C3CA6.5070803@dunslane.net> <571CE6DC.9010501@dunslane.net> <d4c1916b-56de-c594-3dba-03cf550bc778@chrullrich.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox