Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-09-11 Thread Andres Freund
Hi, On 2018-09-11 16:13:15 -0400, Andrew Dunstan wrote: > I've pushed support for the latest MSVC compilers back to all live branches. Thanks! Greetings, Andres Freund

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-09-11 Thread Andrew Dunstan
On 08/24/2018 03:42 PM, Andrew Dunstan wrote: On 08/24/2018 02:38 PM, Tom Lane wrote: Andres Freund writes: On 2018-08-24 14:09:09 -0400, Andrew Dunstan wrote: However, we only support VS2017 down to 9.6 and Vs2015 down to 9.5. Perhaps we should consider backpatching support for those

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-24 Thread Andrew Dunstan
On 08/24/2018 02:38 PM, Tom Lane wrote: Andres Freund writes: On 2018-08-24 14:09:09 -0400, Andrew Dunstan wrote: However, we only support VS2017 down to 9.6 and Vs2015 down to 9.5. Perhaps we should consider backpatching support for those down to 9.3. Hm, I have no strong objections to

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-24 Thread Andrew Dunstan
On 08/24/2018 02:36 PM, Tom Lane wrote: Andrew Dunstan writes: I saw Tom's answer, and it will work as far as it goes. But maybe we should look at doing that in configure instead of putting the onus on all buildfarm owners? It already knows if it's using a GNU compiler, not sure how

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-24 Thread Tom Lane
Andres Freund writes: > On 2018-08-24 14:09:09 -0400, Andrew Dunstan wrote: >> However, we only support VS2017 down to 9.6 and Vs2015 down to 9.5. Perhaps >> we should consider backpatching support for those down to 9.3. > Hm, I have no strong objections to that. I don't think it's strictly >

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-24 Thread Tom Lane
Andrew Dunstan writes: > I saw Tom's answer, and it will work as far as it goes. But maybe we > should look at doing that in configure instead of putting the onus on > all buildfarm owners? It already knows if it's using a GNU compiler, not > sure how ubiquitous the -ansi and -std=c99 flags

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-24 Thread Andres Freund
Hi, On 2018-08-24 14:09:09 -0400, Andrew Dunstan wrote: > I have installed VS2017 on bowerbird and a test is currently running. It's > got past the make phase so I assume everything is kosher. Cool, thanks. > However, we only support VS2017 down to 9.6 and Vs2015 down to 9.5. Perhaps > we

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-24 Thread Andrew Dunstan
On 08/24/2018 11:46 AM, Andres Freund wrote: Hi, On 2018-08-23 18:44:34 -0700, Andres Freund wrote: Pushed the first two. Seems to have worked like expected. I'll send the presumably affected buildfarm owners an email, asking them whether they want to update. Did that. I have

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-24 Thread Andres Freund
On 2018-08-24 12:10:34 -0400, Tom Lane wrote: > Andres Freund writes: > > I'd like to change it so it doesn't enforce C89 compliance across the > > board, but instead enforces the relevant standard. For that I'd need to > > change CFLAGS per-branch in the buildfarm. Is that possible already? Do >

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-24 Thread Tom Lane
Andres Freund writes: > I'd like to change it so it doesn't enforce C89 compliance across the > board, but instead enforces the relevant standard. For that I'd need to > change CFLAGS per-branch in the buildfarm. Is that possible already? Do > I need two different config files? I just did that

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-24 Thread Andres Freund
Hi, On 2018-08-23 18:44:34 -0700, Andres Freund wrote: > Pushed the first two. Seems to have worked like expected. > I'll send the presumably affected buildfarm owners an email, asking > them whether they want to update. Did that. Andrew, as expected my buildfarm animal mylodon, which uses

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-23 Thread Thomas Munro
On Fri, Aug 24, 2018 at 1:44 PM, Andres Freund wrote: > On 2018-08-23 22:02:26 +0200, Peter Eisentraut wrote: >> On 23/08/2018 03:31, Andres Freund wrote: >> > On 2018-08-22 17:09:05 -0700, Andres Freund wrote: >> >> Attached is a version doing so. >> > >> > Mildly updated version attached. This

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-23 Thread Andres Freund
On 2018-08-23 22:02:26 +0200, Peter Eisentraut wrote: > On 23/08/2018 03:31, Andres Freund wrote: > > On 2018-08-22 17:09:05 -0700, Andres Freund wrote: > >> Attached is a version doing so. > > > > Mildly updated version attached. This adds an explanatory commit > > message, removes one stray

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-23 Thread Peter Eisentraut
On 23/08/2018 03:31, Andres Freund wrote: > On 2018-08-22 17:09:05 -0700, Andres Freund wrote: >> Attached is a version doing so. > > Mildly updated version attached. This adds an explanatory commit > message, removes one stray docs C89 reference, and fixes a mis-squashing > of a patch. Let's do

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread Andres Freund
On 2018-08-22 17:09:05 -0700, Andres Freund wrote: > Attached is a version doing so. Mildly updated version attached. This adds an explanatory commit message, removes one stray docs C89 reference, and fixes a mis-squashing of a patch. Greetings, Andres Freund >From

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread Andres Freund
Hi, On 2018-08-22 20:16:24 -0400, Tom Lane wrote: > Andres Freund writes: > > There's a few further potential cleanups due to relying on c99: > > - Use __func__ unconditionally, rather than having configure test for it > > - Use inline unconditionally, rather than having configure test for it >

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread Tom Lane
Andres Freund writes: > There's a few further potential cleanups due to relying on c99: > - Use __func__ unconditionally, rather than having configure test for it > - Use inline unconditionally, rather than having configure test for it > - Remove tests for AC_TYPE_INTPTR_T, AC_TYPE_UINTPTR_T, >

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread Andres Freund
Hi, On 2018-08-22 05:02:11 -0700, Andres Freund wrote: > If we agree on that, I'm going to propose a patch that includes: > - relevant cleanups to configure > - adapts sources.sgml to refer to C99 instead of C89 > - add some trivial conversions to for(int i;;) and struct initializers, > so the

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread David Steele
On 8/22/18 10:56 AM, Peter Eisentraut wrote: > On 22/08/2018 14:02, Andres Freund wrote: >> If we agree on that, I'm going to propose a patch that includes: >> - relevant cleanups to configure >> - adapts sources.sgml to refer to C99 instead of C89 >> - add some trivial conversions to for(int i;;)

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread Andres Freund
Hi, On 2018-08-22 16:56:15 +0200, Peter Eisentraut wrote: > On 22/08/2018 14:02, Andres Freund wrote: > > - do we want to make declarations at arbitrary points errors? It's > > already a warning currently. > > While there are legitimate criticisms, it's a standard feature in C, > C++, and many

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread Peter Eisentraut
On 22/08/2018 14:02, Andres Freund wrote: > If we agree on that, I'm going to propose a patch that includes: > - relevant cleanups to configure > - adapts sources.sgml to refer to C99 instead of C89 > - add some trivial conversions to for(int i;;) and struct initializers, > so the relevant old

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread Sandeep Thakkar
On Wed, Aug 22, 2018 at 5:32 PM, Andres Freund wrote: > Hi, > > On 2018-08-22 17:17:27 +0530, Sandeep Thakkar wrote: > > > We build windows binaries (>=9.3) on Windows 7 and Windows Server 2012 > R2. > > For 9.3, the Visual Studio version is 2010 and for 9.4 and v10, we use > > 2013. For v11, we

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread Andres Freund
Hi, On 2018-08-22 17:17:27 +0530, Sandeep Thakkar wrote: > > We build windows binaries (>=9.3) on Windows 7 and Windows Server 2012 R2. > For 9.3, the Visual Studio version is 2010 and for 9.4 and v10, we use > 2013. For v11, we use 2017. Sndeep: Thanks for the information. Did you ever

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread Sandeep Thakkar
On Wed, Aug 22, 2018 at 4:59 AM, Andres Freund wrote: > On 2018-08-21 17:58:00 -0400, Andrew Dunstan wrote: > > > > > > On 08/21/2018 04:49 PM, Andres Freund wrote: > > > On 2018-08-21 11:09:15 -0700, Joshua D. Drake wrote: > > > > On 08/21/2018 11:06 AM, Andrew Dunstan wrote: > > > > > > > > >

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-22 Thread Amit Kapila
On Tue, Aug 21, 2018 at 11:16 PM, Tom Lane wrote: > Andres Freund writes: >> On 2018-08-21 13:29:20 -0400, Tom Lane wrote: >>> We've got a buildfarm handy that could answer the question. >>> Let's just stick a test function in there for a day and see >>> which animals fail. > >> I think we

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andres Freund
On 2018-08-21 17:58:00 -0400, Andrew Dunstan wrote: > > > On 08/21/2018 04:49 PM, Andres Freund wrote: > > On 2018-08-21 11:09:15 -0700, Joshua D. Drake wrote: > > > On 08/21/2018 11:06 AM, Andrew Dunstan wrote: > > > > > > > > > > > > XP at least is essentially a dead platform for us. My

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andrew Dunstan
On 08/21/2018 04:49 PM, Andres Freund wrote: On 2018-08-21 11:09:15 -0700, Joshua D. Drake wrote: On 08/21/2018 11:06 AM, Andrew Dunstan wrote: XP at least is essentially a dead platform for us. My animals are not able to build anything after release 10. I wouldn't think XP should even

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andres Freund
On 2018-08-21 11:09:15 -0700, Joshua D. Drake wrote: > On 08/21/2018 11:06 AM, Andrew Dunstan wrote: > > > > > > > > XP at least is essentially a dead platform for us. My animals are not > > able to build anything after release 10. > > I wouldn't think XP should even be on our list anymore.

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andres Freund
On 2018-08-21 14:06:18 -0400, Andrew Dunstan wrote: > > > On 08/21/2018 01:31 PM, Andres Freund wrote: > > Hi, > > > > On 2018-08-21 13:29:20 -0400, Tom Lane wrote: > > > Peter Eisentraut writes: > > > > So, does anyone with Windows build experience want to comment on this? > > > > The

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Joshua D. Drake
On 08/21/2018 11:06 AM, Andrew Dunstan wrote: XP at least is essentially a dead platform for us. My animals are not able to build anything after release 10. I wouldn't think XP should even be on our list anymore. Microsoft hasn't supported it in 4 years. JD -- Command Prompt, Inc. ||

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andrew Dunstan
On 08/21/2018 01:31 PM, Andres Freund wrote: Hi, On 2018-08-21 13:29:20 -0400, Tom Lane wrote: Peter Eisentraut writes: So, does anyone with Windows build experience want to comment on this? The proposal is to desupport anything older than (probably) MSVC 2013, or alternatively anything

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Chapman Flack
On 08/21/2018 01:46 PM, Tom Lane wrote: > Andres Freund writes: >> On 2018-08-21 13:29:20 -0400, Tom Lane wrote: >>> We've got a buildfarm handy that could answer the question. >>> Let's just stick a test function in there for a day and see >>> which animals fail. > >> I think we pretty much

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andres Freund
Hi, On 2018-08-21 13:46:10 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2018-08-21 13:29:20 -0400, Tom Lane wrote: > >> We've got a buildfarm handy that could answer the question. > >> Let's just stick a test function in there for a day and see > >> which animals fail. > > > I think we

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Tom Lane
Andres Freund writes: > On 2018-08-21 13:29:20 -0400, Tom Lane wrote: >> We've got a buildfarm handy that could answer the question. >> Let's just stick a test function in there for a day and see >> which animals fail. > I think we pretty much know the answer already, anything before 2013 > will

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Tom Lane
Peter Eisentraut writes: > So, does anyone with Windows build experience want to comment on this? > The proposal is to desupport anything older than (probably) MSVC 2013, > or alternatively anything that cannot compile the attached test file. We've got a buildfarm handy that could answer the

Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Peter Eisentraut
On 16/08/2018 15:00, Andres Freund wrote: >> According to my research (completely untested in practice), you need >> 2010 for mixed code and declarations and 2013 for named initialization >> of structs. >> >> I wonder what raising the msvc requirement would imply for supporting >> older Windows