Re: define bool in pgtypeslib_extern.h

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: define bool in pgtypeslib_extern.h
Date: 2019-11-07 20:47:52
Message-ID: 21017.1573159672@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I 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.

Here's a proposed patch that does it like that.

I'm of two minds about whether to back-patch or not. This shouldn't
really change anything except on platforms where sizeof(_Bool) isn't
one. We have some reason to think that nobody is actually using
ecpg on such platforms :-(, because if they were, they'd likely have
complained about breakage. So maybe we should just put this in HEAD
and be done.

regards, tom lane

Attachment Content-Type Size
make-ecpgs-bool-definition-match-c-h.patch text/x-diff 5.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2019-11-07 21:26:55 Re: Does 'instead of delete' trigger support modification of OLD
Previous Message Tom Lane 2019-11-07 20:00:37 Re: Removing pg_pltemplate and creating "trustable" extensions