Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-12 Thread Tom Lane
Andres Freund writes: > But it's easy to do so in configure, and then have a separate definition > in pg_config.h.win32. Done so in the attached commit. It's slightly ugly > to have two definitions of restrict in pg_config.h.in, but whatever. WFM.

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-12 Thread Andres Freund
Hi, On 2017-10-12 11:03:34 -0700, Andres Freund wrote: > On 2017-10-12 13:55:07 -0400, Tom Lane wrote: > > Or, if you insist on having it, we're going to have to go the pg_restrict > > route. I don't see why that means duplicating any configure logic: on > > non-Windows we can use the autoconf

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-12 Thread Andres Freund
Hi, On 2017-10-12 13:55:07 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-10-12 11:30:00 -0400, Tom Lane wrote: > >> I don't actually see why you need a #define at all --- "restrict" is the > >> standard spelling of the keyword no? > > > It is, but a lot of

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-12 Thread Tom Lane
Andres Freund writes: > On 2017-10-12 11:30:00 -0400, Tom Lane wrote: >> I don't actually see why you need a #define at all --- "restrict" is the >> standard spelling of the keyword no? > It is, but a lot of compilers name it differently, e.g. __restrict in > the case of

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-12 Thread Andres Freund
On 2017-10-12 11:30:00 -0400, Tom Lane wrote: > Andres Freund writes: > > I've temporarily silenced that error by moving the stdlib.h include > > before the definition of restrict, but that seems fairly fragile. I > > primarily wanted to see whether there's other problems. At

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-12 Thread Tom Lane
Andres Freund writes: > I've temporarily silenced that error by moving the stdlib.h include > before the definition of restrict, but that seems fairly fragile. I > primarily wanted to see whether there's other problems. At least thrips > is is now happy. > I see a number of

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-11 Thread Andres Freund
On 2017-10-11 21:59:53 -0700, Andres Freund wrote: > That fixed that problem I think. But unfortunately since then another > problem has been reported by some other animals, all with older msvc > versions afaict (thrips - vs 2012, bowerbird - vs 2012). Correction, thrips is vs 2010, not 2012.

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-11 Thread Andres Freund
On 2017-10-11 17:13:20 -0700, Andres Freund wrote: > Hi, > > On 2017-10-11 23:11:15 +, Andres Freund wrote: > > Add configure infrastructure to detect support for C99's restrict. > > > > Will be used in later commits improving performance for a few key > > routines where information about

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-11 Thread Andres Freund
Hi, On 2017-10-11 23:11:15 +, Andres Freund wrote: > Add configure infrastructure to detect support for C99's restrict. > > Will be used in later commits improving performance for a few key > routines where information about aliasing allows for significantly > better code generation. > >