Skip to content

Commit ff47d4b

Browse files
committed
Work around stdbool problem in dfmgr.c.
Commit 842cb9f refactored things so that dfmgr.c includes <dlfcn.h>, which before that had only been directly included in platform-specific stub files. It turns out that on macOS, <dlfcn.h> includes <stdbool.h>, and that causes problems on platforms where _Bool is not char-sized ... which happens to include the PPC versions of macOS. Work around it much as we have in plperl.h, by #undef'ing bool after including the problematic file, but only if we're not using stdbool-style booleans. Discussion: https://postgr.es/m/E1fxqjl-0003YS-NS@gemulon.postgresql.org
1 parent ed0cdf0 commit ff47d4b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/backend/utils/fmgr/dfmgr.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@
1818

1919
#ifdef HAVE_DLOPEN
2020
#include <dlfcn.h>
21+
22+
/*
23+
* On macOS, <dlfcn.h> insists on including <stdbool.h>. If we're not
24+
* using stdbool, undef bool to undo the damage.
25+
*/
26+
#ifndef USE_STDBOOL
27+
#ifdef bool
28+
#undef bool
29+
#endif
2130
#endif
31+
#endif /* HAVE_DLOPEN */
2232

2333
#include "fmgr.h"
2434
#include "lib/stringinfo.h"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy