Re: taking stdbool.h into use

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, remi_zara(at)mac(dot)com
Subject: Re: taking stdbool.h into use
Date: 2017-08-16 21:31:00
Message-ID: 28759.1502919060@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> gaur/pademelon isn't booted up right now, but it might provide
> an example of a system that lacks <stdbool.h> altogether.
> (If it doesn't, I'd be willing to concede that we need not
> consider that scenario anymore.)

For the record --- pademelon (vendor cc on that box) doesn't have
<stdbool.h> at all. gaur (user-installed gcc) has such a header,
but it contains

typedef enum
{
false = 0,
true = 1
} bool;

which unsurprisingly results in
sizeof(bool) = 4

What's possibly more relevant to Peter's patch, this represents
a platform on which "#include <stdbool.h>" succeeds, but
(a) there is no typedef _Bool, and (b) "bool" is not a macro.
Obviously pre-C99 ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-08-16 21:34:59 Re: Hash Functions
Previous Message Tom Lane 2017-08-16 21:20:41 Re: Atomics for heap_parallelscan_nextpage()