Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2m4p-0005Jj-0x for pgsql-committers@arkaria.postgresql.org; Thu, 12 Oct 2017 22:35:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e2m4o-00085I-IA for pgsql-committers@arkaria.postgresql.org; Thu, 12 Oct 2017 22:35:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e2m4Y-0007eF-1e for pgsql-committers@postgresql.org; Thu, 12 Oct 2017 22:35:22 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e2m4Q-0006dw-5h for pgsql-committers@postgresql.org; Thu, 12 Oct 2017 22:35:20 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id F1421211E1; Thu, 12 Oct 2017 18:35:12 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 12 Oct 2017 18:35:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=mA3eck9aWZplEqe2Hfrg0fWBYm/o6 fxJI6yPchDQ/b4=; b=P7z81kI0fAfb/m3a/BqxHynuon5yI72BZJRSEgNSkaWr3 Z5j1jalMghSgkwM6cmg90dO4u7av7nhHx8Lt13N+vgyVXqTnfj0mQLVbrIGbkVbw 8gLhvOxjpc/ZWBsc/9ni5erpXeNWgEsWY1+kvyz7uPlsiMtJqjvvfEwvmzo+UOGn 3rp0jIwAUgEwmNTVNvNwzCukZjnDF+DgUolEdiG4A6V77Z85Gvw959zFkSz7H5P5 6TmgATxXucLbt6PP5HVZJInrDluHfzqaXkKBWFJxcEwophmsUpyhWGLKMcW4ndHS 5lHk25w0PwYa+t+kgMOX5xmAorhTlpc0hu8Dboegw== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id 9AF502479F; Thu, 12 Oct 2017 18:35:12 -0400 (EDT) Date: Thu, 12 Oct 2017 15:35:11 -0700 From: Andres Freund To: Tom Lane Cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Add configure infrastructure to detect support for C99's restric Message-ID: <20171012223511.oymahnwm6fnh4kdz@alap3.anarazel.de> References: <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> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="iyijhubx4fbi7yyl" Content-Disposition: inline In-Reply-To: <20171012180334.i2stb7ubuiihdu22@alap3.anarazel.de> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org --iyijhubx4fbi7yyl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --iyijhubx4fbi7yyl Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Use-C99-restrict-via-pg_restrict-rather-than-restric.patch"