Re: VS 2015 support in src/tools/msvc

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Petr Jelinek <petr(at)2ndquadrant(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VS 2015 support in src/tools/msvc
Date: 2016-03-25 12:55:46
Message-ID: CA+TgmoYt+Qj+jabxiJnbY-oQRaH4iwL0G-KszcywrQ30d1c0FQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 25, 2016 at 8:31 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Fri, Mar 25, 2016 at 9:09 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Thu, Mar 24, 2016 at 1:07 PM, Petr Jelinek <petr(at)2ndquadrant(dot)com> wrote:
>>> On 24/03/16 17:28, Robert Haas wrote:
>>>> On Wed, Mar 23, 2016 at 3:17 AM, Michael Paquier
>>>> <michael(dot)paquier(at)gmail(dot)com> wrote:
>>>>>
>>>>> - 0001 fixes the global declarations of TIMEZONE_GLOBAL and
>>>>> TZNAME_GLOBAL to be WIN32-compliant. I got bitten by that in the ECPG
>>>>> compilation.
>>>>
>>>> So this isn't going to break other Windows builds? I mean, if we've
>>>> got the names for those symbols wrong, how is this working right now?
>>>>
>>>
>>> We didn't older versions just defined the other variants as well, but the
>>> _timezone and _tzname have been around since at least VS2003.
>>
>> I am unable to parse this sentence. Sorry.
>
> Petr means that both _timezone and _tzname are objects defined in
> Visual Studio since more or less its 2003 release
> (https://msdn.microsoft.com/en-us/library/htb3tdkc%28v=vs.71%29.aspx).
> The oldest version on the buildfarm is Visual Studio 2005, and I agree
> with him that there is no need to worry about older versions than
> VS2003. The issue is that VS2015 does *not* define timezone and tzname
> (please note the prefix underscore missing in those variable names),
> causing compilation failures. That's why I am suggesting such a change
> in this patch: this will allow the code to compile on VS2015, and
> that's compatible with VS2003~.

OK, that makes sense. The documentation says: "There are several
different ways of building PostgreSQL on Windows. The simplest way to
build with Microsoft tools is to install Visual Studio Express 2013
for Windows Desktop and use the included compiler. It is also possible
to build with the full Microsoft Visual C++ 2005 to 2013. In some
cases that requires the installation of the Windows SDK in addition to
the compiler." So the fact that pre-2003 is out is, I think, covered
by that.

The relationship between doc/src/sgml/install-windows.sgml, the
section of doc/src/sgml/installation.sgml entitled "MinGW/Native
Windows", and src/tools/msvc/README is not altogether clear to me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2016-03-25 12:58:14 Re: Small patch: fix code duplication in heapam.c
Previous Message Craig Ringer 2016-03-25 12:53:38 Re: 2PC support for pglogical