Re: pgsql: Make the order of the header file includes consistent in non-bac

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Amit Kapila <akapila(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Make the order of the header file includes consistent in non-bac
Date: 2019-10-25 08:00:03
Message-ID: 87h83xmg4m.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

>>>>> "Amit" == Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:

Amit> BTW, prairiedog is also show similar failure and both seems to
Amit> have similar OS except for versions.

Be aware that prairiedog and locust (unlike the rest of the buildfarm)
have compilers whose "bool" type is not 1 byte long; PG can't use that,
so we don't include <stdbool.h> on those platforms.

Looking at c.h, the problem seems to be that when we define our own bool
in the absence of a usable stdbool.h, we do so as a typedef and not a
macro. So pgtypeslib_extern.h ends up redefining it in that case, and
(this bit may be my fault: see d26a810eb) uses a different type to c.h
(char vs. unsigned char).

(stdbool.h is required by spec to do #define bool _Bool rather than a
typedef, hence the difference in behavior)

I'm no expert on the ECPG internals, but this doesn't look like an
exposed interface, so maybe it just shouldn't be trying to #define bool
at all and just rely on c.h (from postgres_fe.h) to declare the type?

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2019-10-25 09:50:09 Re: pgsql: Make the order of the header file includes consistent in non-bac
Previous Message Michael Paquier 2019-10-25 06:17:09 Re: pgsql: Make the order of the header file includes consistent in non-bac