pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Refactor dlopen() support
Date: Fri, 07 Sep 2018 17:13:11 -0400
Message-ID: <22629.1536354791@sss.pgh.pa.us> (raw)
In-Reply-To: <beaac5d2-33e4-0d60-5e7a-72fb034e35a9@2ndquadrant.com>
References: <E1fxqjl-0003YS-NS@gemulon.postgresql.org>
	<14508.1536301857@sss.pgh.pa.us>
	<765f9eb2-789c-59b2-c4c3-8ee865038b58@2ndquadrant.com>
	<3574.1536329946@sss.pgh.pa.us>
	<beaac5d2-33e4-0d60-5e7a-72fb034e35a9@2ndquadrant.com>

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> 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

Attachments:

undo-stdbool-damage-in-dfmgr.patch (text/x-diff, 563B) download 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 <dlfcn.h> + + /* + * On macOS, <dlfcn.h> insists on including <stdbool.h>. 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"

view thread (6+ messages)

Message-ID: <22629.1536354791@sss.pgh.pa.us>
Permalink:  ../22629.1536354791@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22629.1536354791@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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Refactor dlopen() support
  In-Reply-To: <22629.1536354791@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