pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Add configure infrastructure to detect support for C99's restric
Date: Thu, 12 Oct 2017 15:35:11 -0700
Message-ID: <20171012223511.oymahnwm6fnh4kdz@alap3.anarazel.de> (raw)
In-Reply-To: <20171012180334.i2stb7ubuiihdu22@alap3.anarazel.de>
References: <E1e2Q9j-000183-L0@gemulon.postgresql.org>
	<20171012001320.4putagiruuehtvb6@alap3.anarazel.de>
	<20171012045953.khz4bjdrar5mzrm7@alap3.anarazel.de>
	<2097.1507822200@sss.pgh.pa.us>
	<20171012174544.53kwdeyrt4id7hgg@alap3.anarazel.de>
	<2656.1507830907@sss.pgh.pa.us>
	<20171012180334.i2stb7ubuiihdu22@alap3.anarazel.de>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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

Attachments:

  0001-Use-C99-restrict-via-pg_restrict-rather-than-restric.patch (text/x-diff, 0B) download

view thread (10+ messages)  latest in thread

Message-ID: <20171012223511.oymahnwm6fnh4kdz@alap3.anarazel.de>
Permalink:  ../20171012223511.oymahnwm6fnh4kdz@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20171012223511.oymahnwm6fnh4kdz@alap3.anarazel.de

 ·  · 

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-committers@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Add configure infrastructure to detect support for C99's restric
  In-Reply-To: <20171012223511.oymahnwm6fnh4kdz@alap3.anarazel.de>
  References: <E1e2Q9j-000183-L0@gemulon.postgresql.org> <20171012001320.4putagiruuehtvb6@alap3.anarazel.de> <20171012045953.khz4bjdrar5mzrm7@alap3.anarazel.de> <2097.1507822200@sss.pgh.pa.us> <20171012174544.53kwdeyrt4id7hgg@alap3.anarazel.de> <2656.1507830907@sss.pgh.pa.us> <20171012180334.i2stb7ubuiihdu22@alap3.anarazel.de> <20171012223511.oymahnwm6fnh4kdz@alap3.anarazel.de>

* 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