Re: pgsql: Fix for globals.c- c.h must come first

From: Andres Freund <andres(at)anarazel(dot)de>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix for globals.c- c.h must come first
Date: 2018-06-19 18:03:57
Message-ID: 20180619180357.k7c6c47dptva2vsp@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2018-06-19 13:58:34 -0400, Bruce Momjian wrote:
> On Sat, May 19, 2018 at 01:20:47AM +0000, Stephen Frost wrote:
> > Fix for globals.c- c.h must come first
> >
> > Commit da9b580 mistakenly put a system header before postgres.h (which
> > includes c.h). That can cause portability issues and broke (at least)
> > builds with older Windows compilers.
>
> I assume there is no way to add defined and checks to globals.c and c.h
> to cause a compile error when this happens.

I don't see how to do so in a form that's even halfway portable.

Just to be clear: There's nothing globals.c specific about the rule to
always include postgres.h first.

Greetings,

Andres Freund

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-06-19 18:09:15 Re: pgsql: Fix for globals.c- c.h must come first
Previous Message Bruce Momjian 2018-06-19 17:58:34 Re: pgsql: Fix for globals.c- c.h must come first