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

From Tom Lane
Subject Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric
Date
Msg-id 2097.1507822200@sss.pgh.pa.us
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 detectsupport for C99's restric  (Andres Freund <andres@anarazel.de>)
List pgsql-committers
Andres Freund <andres@anarazel.de> 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

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.
Next
From: Alvaro Herrera
Date:
Subject: [COMMITTERS] pgsql: Infer functional dependency past RelabelType