Content-Length: 273250 | pFad | http://github.com/postgrespro/postgres_cluster/commit/ff47d4bf1f208227a2e087ef7269e88285fa257e

3B Work around stdbool problem in dfmgr.c. · postgrespro/postgres_cluster@ff47d4b · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/ff47d4bf1f208227a2e087ef7269e88285fa257e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy