Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2fRJ-0002zO-UM for pgsql-committers@arkaria.postgresql.org; Thu, 12 Oct 2017 15:30:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e2fRJ-0006qL-4d for pgsql-committers@arkaria.postgresql.org; Thu, 12 Oct 2017 15:30:25 +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 1e2fR3-0006Ly-C3 for pgsql-committers@postgresql.org; Thu, 12 Oct 2017 15:30:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e2fQz-0005dF-QD for pgsql-committers@postgresql.org; Thu, 12 Oct 2017 15:30:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v9CFU0r6002098; Thu, 12 Oct 2017 11:30:01 -0400 From: Tom Lane To: Andres Freund cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Add configure infrastructure to detect support for C99's restric In-reply-to: <20171012045953.khz4bjdrar5mzrm7@alap3.anarazel.de> References: <20171012001320.4putagiruuehtvb6@alap3.anarazel.de> <20171012045953.khz4bjdrar5mzrm7@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 11 Oct 2017 21:59:53 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2096.1507822200.1@sss.pgh.pa.us> Date: Thu, 12 Oct 2017 11:30:00 -0400 Message-ID: <2097.1507822200@sss.pgh.pa.us> 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 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 options to continue: > - only define restrict on msvc 2013+ - for some reason woodlouse didn't > complain about this problem, but I'm very doubtful that that's > actually reliable. > - rename restrict to pg_restrict. That's annoying because we'd have to > copy the autoconf test. > - live with the hack of including stdlib.h early, in pg_config.h.win32. > - $better_idea I don't actually see why you need a #define at all --- "restrict" is the standard spelling of the keyword no? I really do not like the stdlib.h hack: that amounts to assuming that only stdlib.h does or ever will contain declspec(restrict). Maybe you could get away with that if you were applying it only to long-dead MSVC versions, but doing it "#if (_MSC_VER >= 1500)" is clearly going to break someday. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers