Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyO4E-0002Pz-T7 for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Sep 2018 21:13:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fyO4C-0006hy-PE for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Sep 2018 21:13:24 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyO4C-0006hr-Hy for pgsql-hackers@lists.postgresql.org; Fri, 07 Sep 2018 21:13:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyO44-0005BW-UI for pgsql-hackers@lists.postgresql.org; Fri, 07 Sep 2018 21:13:24 +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 w87LDBGJ022630; Fri, 7 Sep 2018 17:13:11 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Refactor dlopen() support In-reply-to: References: <14508.1536301857@sss.pgh.pa.us> <765f9eb2-789c-59b2-c4c3-8ee865038b58@2ndquadrant.com> <3574.1536329946@sss.pgh.pa.us> Comments: In-reply-to Peter Eisentraut message dated "Fri, 07 Sep 2018 18:27:28 +0200" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <22581.1536354736.0@sss.pgh.pa.us> Date: Fri, 07 Sep 2018 17:13:11 -0400 Message-ID: <22629.1536354791@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22581.1536354736.1@sss.pgh.pa.us> Peter Eisentraut writes: > On 07/09/2018 16:19, Tom Lane wrote: >> Somehow or other, the changes you made in dfmgr.c's #include lines >> have made it so that find_rendezvous_variable's local "bool found" >> variable is actually of type _Bool (which is word-wide on these >> machines). > Ah because dlfcn.h includes stdbool.h. Hmm. Yeah, and that's still true as of current macOS, it seems. I can make the problem go away with the attached patch (borrowed from similar code in plperl.h). It's kind of grotty but I'm not sure there's a better way. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="undo-stdbool-damage-in-dfmgr.patch"; charset="us-ascii" Content-ID: <22581.1536354736.2@sss.pgh.pa.us> Content-Description: undo-stdbool-damage-in-dfmgr.patch Content-Transfer-Encoding: quoted-printable diff --git a/src/backend/utils/fmgr/dfmgr.c b/src/backend/utils/fmgr/dfmgr= .c index c2a2572..4a5cc7c 100644 *** a/src/backend/utils/fmgr/dfmgr.c --- b/src/backend/utils/fmgr/dfmgr.c *************** *** 18,24 **** --- 18,34 ---- = #ifdef HAVE_DLOPEN #include + = + /* + * On macOS, insists on including . If we're not + * using stdbool, undef bool to undo the damage. + */ + #ifndef USE_STDBOOL + #ifdef bool + #undef bool #endif + #endif + #endif /* HAVE_DLOPEN */ = #include "fmgr.h" #include "lib/stringinfo.h" ------- =_aaaaaaaaaa0--