Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2hYS-0003Py-5C for pgsql-committers@arkaria.postgresql.org; Thu, 12 Oct 2017 17:45:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e2hYR-0004Y7-2m for pgsql-committers@arkaria.postgresql.org; Thu, 12 Oct 2017 17:45:55 +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 1e2hYQ-0004Un-68 for pgsql-committers@postgresql.org; Thu, 12 Oct 2017 17:45:54 +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 1e2hYJ-0000En-Eb for pgsql-committers@postgresql.org; Thu, 12 Oct 2017 17:45:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DE76921846; Thu, 12 Oct 2017 13:45:45 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 12 Oct 2017 13:45:45 -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=vSPEvyuzin5zkamOsx3+GckLLFTk9 2MSl6fYGzp00ZY=; b=YDC44J3CJZx2+3Kg28pxb8JNW6S2SLuyJS6sVthhN+m9m dmcnoTU4KOgvCaJDJHHifBROP1oa4eCDe2Z6NkpMujxBm7wMnHdSur/OV9FeiDh8 r4gL5KDk2LuqtnPcx8scTJlCdquk3ou4C6n1n/VwcBWMjJh220i5ldKhyyIsCOns L/QhkagtTDUbReH1veWcwOEZvv1Q/5wwATaccLfZrGo12uUorpSW0vY6tn01vmtg /ytkD1h0ePoGmgTm0/HsZAELuW6wnP5GeIh+21Y7TZZopIAB9VntI0FjPKKQEF1N q1BIWmhCj4u8FiO8rD0K46ZeVSvnITwddrM4JUHhA== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id 9394724141; Thu, 12 Oct 2017 13:45:45 -0400 (EDT) Date: Thu, 12 Oct 2017 10:45:44 -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: <20171012174544.53kwdeyrt4id7hgg@alap3.anarazel.de> References: <20171012001320.4putagiruuehtvb6@alap3.anarazel.de> <20171012045953.khz4bjdrar5mzrm7@alap3.anarazel.de> <2097.1507822200@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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 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 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? It is, but a lot of compilers name it differently, e.g. __restrict in the case of msvc. > 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. Yea, I dislike it quite a bit too. Unfortunately not even defining restrict to empty as if it were unsupported looks viable to me :( 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