Re: define bool in pgtypeslib_extern.h
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Andrew Gierth <andrew@tao11.riddles.org.uk>,
Michael Meskes <meskes@postgresql.org>
Date: 2019-11-06T14:54:25Z
Lists: pgsql-hackers
Amit Kapila <amit.kapila16@gmail.com> writes: > On Mon, Oct 28, 2019 at 11:27 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> A plausible alternative is to do >> >> -#define bool char >> +#define bool unsigned char >> >> which is correct on platforms where we don't use <stdbool.h>, >> and is at least no worse than now on those where we do. In >> practice, since we know sizeof(_Bool) == 1 on platforms where >> we use it, this is probably just fine for dtrace's purposes. > +1 for the second alternative as it will make it similar to c.h. Yeah, that's the minimum-risk alternative. I'll go make it so. regards, tom lane
Commits
-
Fix ecpglib.h to declare bool consistently with c.h.
- 7a0574b50ee9 13.0 landed
-
Move declaration of ecpg_gettext() to a saner place.
- c8cb98ec41f0 13.0 landed
- baa483984fde 9.6.16 landed
- b705d639146c 9.5.20 landed
- b20233aac743 9.4.25 landed
- 89f56fc223f9 11.6 landed
- 831ca9513c59 10.11 landed
- 101654987344 12.1 landed
-
Sync our DTrace infrastructure with c.h's definition of type bool.
- d4d0cd6ee23e 12.1 landed
- ff43b3e88ece 13.0 landed
-
Get rid of useless/dangerous redefinition of bool in ECPG.
- 4a61aa4a945f 12.1 landed
- 1408d5d86992 13.0 landed