Re: [COMMITTERS] pgsql: Add configure infrastructure to detectsupport for C99's restric - Mailing list pgsql-committers

From Andres Freund
Subject Re: [COMMITTERS] pgsql: Add configure infrastructure to detectsupport for C99's restric
Date
Msg-id 20171012223511.oymahnwm6fnh4kdz@alap3.anarazel.de
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add configure infrastructure to detectsupport for C99's restric  (Andres Freund <andres@anarazel.de>)
Responses Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric
List pgsql-committers
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 probe and then write
> > "#define pg_restrict restrict".
> 
> Yea, that should work. I'll try to come up with a patch.

We can't do so unconditionally in c.h or such, because that'd again
cause conflicts with __declspec(restrict) on MSVC versions that don't
support restrict, because it'd require restrict to be defined empty.

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.

Greetings,

Andres Freund

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

Attachment

pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [COMMITTERS] pgsql: Fix traversal of half-frozen update chains
Next
From: Andres Freund
Date:
Subject: Re: [COMMITTERS] pgsql: Improve performance ofSendRowDescriptionMessage.