Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff47d4b

Browse files
committed
Work around stdbool problem in dfmgr.c.
Commit842cb9f refactored things so that dfmgr.c includes <dlfcn.h>,which before that had only been directly included in platform-specificstub 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 itmuch as we have in plperl.h, by #undef'ing bool after including theproblematic file, but only if we're not using stdbool-style booleans.Discussion:https://postgr.es/m/E1fxqjl-0003YS-NS@gemulon.postgresql.org
1 parented0cdf0 commitff47d4b

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
#ifdefHAVE_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+
#ifndefUSE_STDBOOL
27+
#ifdefbool
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)

[8]ページ先頭

©2009-2025 Movatter.jp