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 1iO2Pa-0000S1-E6 for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Oct 2019 16:26:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iO2PY-0007EU-UG for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Oct 2019 16:26:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iO2PY-0007EN-IL for pgsql-hackers@lists.postgresql.org; Fri, 25 Oct 2019 16:26:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iO2PW-00055K-A7 for pgsql-hackers@lists.postgresql.org; Fri, 25 Oct 2019 16:25:59 +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 x9PGPtXH018579; Fri, 25 Oct 2019 12:25:55 -0400 From: Tom Lane To: Amit Kapila cc: PostgreSQL Hackers , Andrew Gierth Subject: Re: define bool in pgtypeslib_extern.h In-reply-to: <16583.1572010913@sss.pgh.pa.us> References: <16583.1572010913@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 25 Oct 2019 09:41:53 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18577.1572020755.1@sss.pgh.pa.us> Date: Fri, 25 Oct 2019 12:25:55 -0400 Message-ID: <18578.1572020755@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Amit Kapila writes: >> As suggested by Andrew Gierth [1], I think we can remove the define in >> pgtypeslib_extern.h as it doesn't seem to be exposed. > Yeah, it's not good that that results in a header ordering dependency, > and it doesn't seem like a good idea for pgtypeslib_extern.h to be > messing with the issue at all. > If you like, I can experiment with that locally on prairiedog's host > before we make the buildfarm jump through hoops. I checked that that works and fixes the immediate problem, so I pushed it. However, we're not out of the woods, because lookee here in ecpglib.h: #ifndef __cplusplus #ifndef bool #define bool char #endif /* ndef bool */ #ifndef true #define true ((bool) 1) #endif /* ndef true */ #ifndef false #define false ((bool) 0) #endif /* ndef false */ #endif /* not C++ */ #ifndef TRUE #define TRUE 1 #endif /* TRUE */ #ifndef FALSE #define FALSE 0 #endif /* FALSE */ This stuff *is* exposed to client programs, so it's not clear how painless it'd be to monkey around with it. And it is used, further down in the same file, so we can't fix it just by deleting it. Nor can we import c.h to get the "real" definition from that. I'm more than slightly surprised that we haven't already seen problems due to this conflicting with d26a810eb. I've not bothered to run to ground exactly why not, though. Thoughts? regards, tom lane