Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSMhd-00030v-PB for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Nov 2019 14:54:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSMhc-0003S6-Jo for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Nov 2019 14:54:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSMhc-0003Ry-Ay for pgsql-hackers@lists.postgresql.org; Wed, 06 Nov 2019 14:54:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSMhZ-0005eU-Ua; Wed, 06 Nov 2019 14:54:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xA6EsPtM027326; Wed, 6 Nov 2019 09:54:25 -0500 From: Tom Lane To: Amit Kapila cc: PostgreSQL Hackers , Andrew Gierth , Michael Meskes Subject: Re: define bool in pgtypeslib_extern.h In-reply-to: References: <16583.1572010913@sss.pgh.pa.us> <18578.1572020755@sss.pgh.pa.us> <32373.1572110364@sss.pgh.pa.us> <28364.1572285439@sss.pgh.pa.us> Comments: In-reply-to Amit Kapila message dated "Wed, 06 Nov 2019 15:04:20 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27324.1573052065.1@sss.pgh.pa.us> Date: Wed, 06 Nov 2019 09:54:25 -0500 Message-ID: <27325.1573052065@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Kapila writes: > On Mon, Oct 28, 2019 at 11:27 PM Tom Lane wrote: >> A plausible alternative is to do >> >> -#define bool char >> +#define bool unsigned char >> >> which is correct on platforms where we don't use , >> 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