pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Michael Meskes <meskes@postgresql.org>
Subject: Re: define bool in pgtypeslib_extern.h
Date: Wed, 06 Nov 2019 09:54:25 -0500
Message-ID: <27325.1573052065@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1KVH+fP8ry7fJjVQP7wSnexXcU-D9BJYjsrabXeBuwd-g@mail.gmail.com>
References: <CAA4eK1LmaKO7Du9M9Lo=kxGU8sB6aL8fa3sF6z6d5yYYVe3BuQ@mail.gmail.com>
	<16583.1572010913@sss.pgh.pa.us>
	<18578.1572020755@sss.pgh.pa.us>
	<CAA4eK1LUFKhiq4vfrvG089wtSvnbfAs3sdTFdbuq428bQ7wCzg@mail.gmail.com>
	<32373.1572110364@sss.pgh.pa.us>
	<CAA4eK1JfbrGNT-b=hkp5eWra0=mKM2jEA_qANugV9FqXuJeTOg@mail.gmail.com>
	<28364.1572285439@sss.pgh.pa.us>
	<CAA4eK1KVH+fP8ry7fJjVQP7wSnexXcU-D9BJYjsrabXeBuwd-g@mail.gmail.com>

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





view thread (15+ messages)  latest in thread

Message-ID: <27325.1573052065@sss.pgh.pa.us>
Permalink:  ../27325.1573052065@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27325.1573052065@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, pgsql-hackers@lists.postgresql.org, andrew@tao11.riddles.org.uk, meskes@postgresql.org
  Subject: Re: define bool in pgtypeslib_extern.h
  In-Reply-To: <27325.1573052065@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox