Re: define bool in pgtypeslib_extern.h

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Andrew Gierth <andrew@tao11.riddles.org.uk>, Michael Meskes <meskes@postgresql.org>
Date: 2019-10-28T06:00:14Z
Lists: pgsql-hackers
On Sat, Oct 26, 2019 at 10:49 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> I'm inclined to think that we need to make ecpglib.h's bool-related
> definitions exactly match c.h, which will mean that it has to pull in
> <stdbool.h> on most platforms, which will mean adding a control symbol
> for that to ecpg_config.h.  I do not think we should export
> HAVE_STDBOOL_H and SIZEOF_BOOL there though; probably better to have
> configure make the choice and export something named like PG_USE_STDBOOL.
>

This sounds reasonable to me, but we also might want to do something
for probes.d.  To be clear, I am not immediately planning to write a
patch for this.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



Commits

  1. Fix ecpglib.h to declare bool consistently with c.h.

  2. Move declaration of ecpg_gettext() to a saner place.

  3. Sync our DTrace infrastructure with c.h's definition of type bool.

  4. Get rid of useless/dangerous redefinition of bool in ECPG.